#!/usr/bin/python
from Tkinter import *
import ttk
import time
import threading
import RPi.GPIO as GPIO
import tkMessageBox
import Tkinter
import tkFileDialog
import os
import tkMessageBox

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)

GPIO.setup(4,GPIO.OUT)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(18,GPIO.OUT)
GPIO.setup(27,GPIO.OUT)
GPIO.setup(22,GPIO.OUT)
GPIO.setup(23,GPIO.OUT)
GPIO.setup(25,GPIO.OUT)
GPIO.setup(5,GPIO.OUT)
GPIO.setup(24, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(10, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(9, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
GPIO.setup(11, GPIO.IN, pull_up_down = GPIO.PUD_DOWN)
#GPIO 9, 10 and 11 will affect the SPI interface.

enable=4
gate=17
bit_1=5
bit_2=25
bit_3=23
bit_4=22
bit_5=27
bit_6=18


speed0=0.5
speed1=0.5
speed2=0.5
speed3=0.5
speed4=0.5
speed5=0.5
speed6=0.5
speed7=0.5
speed8=0.5
speed9=0.5
speed10=0.5
speed11=0.5
speed12=0.5
speed13=0.5
speed14=0.5
speed15=0.5
speed16=0.5
speed17=0.5
speed18=0.5
speed19=0.5
speed20=0.5
speed21=0.5
speed22=0.5
speed23=0.5
speed24=0.5
speed25=0.5
speed26=0.5
speed27=0.5
speed28=0.5
speed29=0.5
speed30=0.5
speed31=0.5
speed32=0.5
speed33=0.5
speed34=0.5
speed35=0.5
speed36=0.5
speed37=0.5
speed38=0.5
speed39=0.5
speed40=0.5
speed41=0.5
speed42=0.5
speed43=0.5
speed44=0.5
speed45=0.5
speed46=0.5
speed47=0.5
speed48=0.5
speed49=0.5
speed50=0.5
speed51=0.5
speed52=0.5
speed53=0.5
speed54=0.5
speed55=0.5
speed56=0.5
speed57=0.5
speed58=0.5
speed59=0.5
speed60=0.5
speed61=0.5
speed62=0.5
speed63=0.5
speed64=0.5
speed65=0.5
speed66=0.5
speed67=0.5
speed68=0.5
speed69=0.5
speed70=0.5
speed71=0.5
speed72=0.5
speed73=0.5
speed74=0.5
speed75=0.5
speed76=0.5
speed77=0.5
speed78=0.5
speed79=0.5
speed80=0.5
speed81=0.5
speed82=0.5
speed83=0.5
speed84=0.5
speed85=0.5
speed86=0.5
speed87=0.5
speed88=0.5
speed89=0.5
speed90=0.5
speed91=0.5
speed92=0.5
speed93=0.5
speed94=0.5
speed95=0.5


repeat=0.5
loop=1
counter = 1

haltno=0


chan_list = (bit_1,bit_2,bit_3,bit_4,bit_5,bit_6)

def close_window():
    root.after(0, root.destroy)

def about():
    tkMessageBox.showinfo(message="   Raspberry Pi / Maplin 3800 \n  Synthesiser Sequencer v3.04 \n\n   Author: walkerworks 2016\nsequencer@walkerworks.co.uk  ")

def help_0():
    top = Toplevel()
    top.title("Help")

    msg = Message(top, text='(a) Set up the notes you want by setting the binary code check boxes, if you do not want to use \
all 96 then select the Halt check box next to your last note. The binary codes and Halt check boxes can be changed while \
the sequencer is running. \n\n(b) Select the time duration between each note, in 0.025 second increments, with the Slower/Faster buttons. \
If you want to change the default delay between each repeat then set the time with the Longer/Shorter buttons in the Loop Control area, again in 0.025 second increments.\n\n(c) \
In the Loop Control area select the check box, Infinite Loop ON/OFF, if you want notes to play in a contineous loop or... \n\n(d) \
If you want to select a preset number of loops select the check box, Loop ON/OFF, in the Loop Control area. Use the More/Less buttons to \
select the number of loops. If neither Loop check boxes are selected the sequence will play once.\n\n(e) \
Selecting the Tempo Tracking faster/slower buttons steps the Tempo times up or down from note 1 to the checked Halt/Repeat box. \n\n(f) \
Select the Start button to begin the sequence. The position of play is shown by the note number being highlighted in blue. \n\n(g) \
Select the Stop button to stop the sequence. On restart the sequence will start from the beginning.\n\n(h) \
Select the Reset button to clear all the Note, Halt, Repeat check boxes and Loop Times ready to create another sequence. \n\n(i) \
To save a sequence go to the menu bar and select File/Save As, a dialog box will open for you to name your file. Click Save to store your file. \
The default file extension is .seq \n\n(j) \
To load a previously saved sequence go to the menu bar and select File/Open, a dialog box will open for you to select a .seq file. \
Once selected click Open and your sequence will be restored.')
    msg.pack()

    button = Button(top, text="Close", command=top.destroy)
    button.pack()


def init(root):
    root.title("RPi Maplin 3800 Synthesiser Sequencer")
    root.geometry('1364x689')


def f0():
    global speed0
    if speed0 <= 0.05:
        return
    speed0=speed0 - 0.025
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())

def f1():
    global speed1
    if speed1 <= 0.05:
        return
    speed1=speed1 - 0.025
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())

def f2():
    global speed2
    if speed2 <= 0.05:
        return
    speed2=speed2 - 0.025
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())

def f3():
    global speed3
    if speed3 <= 0.05:
        return
    speed3=speed3 - 0.025
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())

def f4():
    global speed4
    if speed4 <= 0.05:
        return
    speed4=speed4 - 0.025
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())

def f5():
    global speed5
    if speed5 <= 0.05:
        return
    speed5=speed5 - 0.025
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())

def f6():
    global speed6
    if speed6 <= 0.05:
        return
    speed6=speed6 - 0.025
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())

def f7():
    global speed7
    if speed7 <= 0.05:
        return
    speed7=speed7 - 0.025
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())

def f8():
    global speed8
    if speed8 <= 0.05:
        return
    speed8=speed8 - 0.025
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())

def f9():
    global speed9
    if speed9 <= 0.05:
        return
    speed9=speed9 - 0.025
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())

def f10():
    global speed10
    if speed10 <= 0.05:
        return
    speed10=speed10 - 0.025
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())

def f11():
    global speed11
    if speed11 <= 0.05:
        return
    speed11=speed11 - 0.025
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())

def f12():
    global speed12
    if speed12 <= 0.05:
        return
    speed12=speed12 - 0.025
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())

def f13():
    global speed13
    if speed13 <= 0.05:
        return
    speed13=speed13 - 0.025
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())

def f14():
    global speed14
    if speed14 <= 0.05:
        return
    speed14=speed14 - 0.025
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())

def f15():
    global speed15
    if speed15 <= 0.05:
        return
    speed15=speed15 - 0.025
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())

def f16():
    global speed16
    if speed16 <= 0.05:
        return
    speed16=speed16 - 0.025
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())

def f17():
    global speed17
    if speed17 <= 0.05:
        return
    speed17=speed17 - 0.025
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())

def f18():
    global speed18
    if speed18 <= 0.05:
        return
    speed18=speed18 - 0.025
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())

def f19():
    global speed19
    if speed19 <= 0.05:
        return
    speed19=speed19 - 0.025
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())

def f20():
    global speed20
    if speed20 <= 0.05:
        return
    speed20=speed20 - 0.025
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())

def f21():
    global speed21
    if speed21 <= 0.05:
        return
    speed21=speed21 - 0.025
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())

def f22():
    global speed22
    if speed22 <= 0.05:
        return
    speed22=speed22 - 0.025
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())

def f23():
    global speed23
    if speed23 <= 0.05:
        return
    speed23=speed23 - 0.025
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())

def f24():
    global speed24
    if speed24 <= 0.05:
        return
    speed24=speed24 - 0.025
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())

def f25():
    global speed25
    if speed25 <= 0.05:
        return
    speed25=speed25 - 0.025
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())

def f26():
    global speed26
    if speed26 <= 0.05:
        return
    speed26=speed26 - 0.025
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())

def f27():
    global speed27
    if speed27 <= 0.05:
        return
    speed27=speed27 - 0.025
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())

def f28():
    global speed28
    if speed28 <= 0.05:
        return
    speed28=speed28 - 0.025
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())

def f29():
    global speed29
    if speed29 <= 0.05:
        return
    speed29=speed29 - 0.025
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())

def f30():
    global speed30
    if speed30 <= 0.05:
        return
    speed30=speed30 - 0.025
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())

def f31():
    global speed31
    if speed31 <= 0.05:
        return
    speed31=speed31 - 0.025
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())

def f32():
    global speed32
    if speed32 <= 0.05:
        return
    speed32=speed32 - 0.025
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())

def f33():
    global speed33
    if speed33 <= 0.05:
        return
    speed33=speed33 - 0.025
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())

def f34():
    global speed34
    if speed34 <= 0.05:
        return
    speed34=speed34 - 0.025
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())

def f35():
    global speed35
    if speed35 <= 0.05:
        return
    speed35=speed35 - 0.025
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())

def f36():
    global speed36
    if speed36 <= 0.05:
        return
    speed36=speed36 - 0.025
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())

def f37():
    global speed37
    if speed37 <= 0.05:
        return
    speed37=speed37 - 0.025
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())

def f38():
    global speed38
    if speed38 <= 0.05:
        return
    speed38=speed38 - 0.025
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())

def f39():
    global speed39
    if speed39 <= 0.05:
        return
    speed39=speed39 - 0.025
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())

def f40():
    global speed40
    if speed40 <= 0.05:
        return
    speed40=speed40 - 0.025
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())

def f41():
    global speed41
    if speed41 <= 0.05:
        return
    speed41=speed41 - 0.025
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())

def f42():
    global speed42
    if speed42 <= 0.05:
        return
    speed42=speed42 - 0.025
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())

def f43():
    global speed43
    if speed43 <= 0.05:
        return
    speed43=speed43 - 0.025
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())

def f44():
    global speed44
    if speed44 <= 0.05:
        return
    speed44=speed44 - 0.025
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())

def f45():
    global speed45
    if speed45 <= 0.05:
        return
    speed45=speed45 - 0.025
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())

def f46():
    global speed46
    if speed46 <= 0.05:
        return
    speed46=speed46 - 0.025
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())

def f47():
    global speed47
    if speed47 <= 0.05:
        return
    speed47=speed47 - 0.025
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())

def f48():
    global speed48
    if speed48 <= 0.05:
        return
    speed48=speed48 - 0.025
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())

def f49():
    global speed49
    if speed49 <= 0.05:
        return
    speed49=speed49 - 0.025
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())

def f50():
    global speed50
    if speed50 <= 0.05:
        return
    speed50=speed50 - 0.025
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())

def f51():
    global speed51
    if speed51 <= 0.05:
        return
    speed51=speed51 - 0.025
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())

def f52():
    global speed52
    if speed52 <= 0.05:
        return
    speed52=speed52 - 0.025
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())

def f53():
    global speed53
    if speed53 <= 0.05:
        return
    speed53=speed53 - 0.025
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())

def f54():
    global speed54
    if speed54 <= 0.05:
        return
    speed54=speed54 - 0.025
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())

def f55():
    global speed55
    if speed55 <= 0.05:
        return
    speed55=speed55 - 0.025
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())

def f56():
    global speed56
    if speed56 <= 0.05:
        return
    speed56=speed56 - 0.025
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())

def f57():
    global speed57
    if speed57 <= 0.05:
        return
    speed57=speed57 - 0.025
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())

def f58():
    global speed58
    if speed58 <= 0.05:
        return
    speed58=speed58 - 0.025
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())

def f59():
    global speed59
    if speed59 <= 0.05:
        return
    speed59=speed59 - 0.025
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())

def f60():
    global speed60
    if speed60 <= 0.05:
        return
    speed60=speed60 - 0.025
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())

def f61():
    global speed61
    if speed61 <= 0.05:
        return
    speed61=speed61 - 0.025
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())

def f62():
    global speed62
    if speed62 <= 0.05:
        return
    speed62=speed62 - 0.025
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())

def f63():
    global speed63
    if speed63 <= 0.05:
        return
    speed63=speed63 - 0.025
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())

def f64():
    global speed64
    if speed64 <= 0.05:
        return
    speed64=speed64 - 0.025
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())

def f65():
    global speed65
    if speed65 <= 0.05:
        return
    speed65=speed65 - 0.025
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())

def f66():
    global speed66
    if speed66 <= 0.05:
        return
    speed66=speed66 - 0.025
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())

def f67():
    global speed67
    if speed67 <= 0.05:
        return
    speed67=speed67 - 0.025
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())

def f68():
    global speed68
    if speed68 <= 0.05:
        return
    speed68=speed68 - 0.025
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())

def f69():
    global speed69
    if speed69 <= 0.05:
        return
    speed69=speed69 - 0.025
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())

def f70():
    global speed70
    if speed70 <= 0.05:
        return
    speed70=speed70 - 0.025
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())

def f71():
    global speed71
    if speed71 <= 0.05:
        return
    speed71=speed71 - 0.025
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())

def f72():
    global speed72
    if speed72 <= 0.05:
        return
    speed72=speed72 - 0.025
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())

def f73():
    global speed73
    if speed73 <= 0.05:
        return
    speed73=speed73 - 0.025
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())

def f74():
    global speed74
    if speed74 <= 0.05:
        return
    speed74=speed74 - 0.025
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())

def f75():
    global speed75
    if speed75 <= 0.05:
        return
    speed75=speed75 - 0.025
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())

def f76():
    global speed76
    if speed76 <= 0.05:
        return
    speed76=speed76 - 0.025
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())

def f77():
    global speed77
    if speed77 <= 0.05:
        return
    speed77=speed77 - 0.025
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())

def f78():
    global speed78
    if speed78 <= 0.05:
        return
    speed78=speed78 - 0.025
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())

def f79():
    global speed79
    if speed79 <= 0.05:
        return
    speed79=speed79 - 0.025
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())

def f80():
    global speed80
    if speed80 <= 0.05:
        return
    speed80=speed80 - 0.025
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())

def f81():
    global speed81
    if speed81 <= 0.05:
        return
    speed81=speed81 - 0.025
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())

def f82():
    global speed82
    if speed82 <= 0.05:
        return
    speed82=speed82 - 0.025
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())

def f83():
    global speed83
    if speed83 <= 0.05:
        return
    speed83=speed83 - 0.025
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())

def f84():
    global speed84
    if speed84 <= 0.05:
        return
    speed84=speed84 - 0.025
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())

def f85():
    global speed85
    if speed85 <= 0.05:
        return
    speed85=speed85 - 0.025
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())

def f86():
    global speed86
    if speed86 <= 0.05:
        return
    speed86=speed86 - 0.025
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())

def f87():
    global speed87
    if speed87 <= 0.05:
        return
    speed87=speed87 - 0.025
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())

def f88():
    global speed88
    if speed88 <= 0.05:
        return
    speed88=speed88 - 0.025
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())

def f89():
    global speed89
    if speed89 <= 0.05:
        return
    speed89=speed89 - 0.025
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())

def f90():
    global speed90
    if speed90 <= 0.05:
        return
    speed90=speed90 - 0.025
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())

def f91():
    global speed91
    if speed91 <= 0.05:
        return
    speed91=speed91 - 0.025
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())

def f92():
    global speed92
    if speed92 <= 0.05:
        return
    speed92=speed92 - 0.025
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())

def f93():
    global speed93
    if speed93 <= 0.05:
        return
    speed93=speed93 - 0.025
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())

def f94():
    global speed94
    if speed94 <= 0.05:
        return
    speed94=speed94 - 0.025
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())

def f95():
    global speed95
    if speed95 <= 0.05:
        return
    speed95=speed95 - 0.025
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())


def s0():
    global speed0
    speed0 = speed0 + 0.025
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())

def s1():
    global speed1
    speed1 = speed1 + 0.025
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())

def s2():
    global speed2
    speed2 = speed2 + 0.025
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())

def s3():
    global speed3
    speed3 = speed3 + 0.025
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())

def s4():
    global speed4
    speed4 = speed4 + 0.025
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())

def s5():
    global speed5
    speed5 = speed5 + 0.025
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())

def s6():
    global speed6
    speed6 = speed6 + 0.025
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())

def s7():
    global speed7
    speed7 = speed7 + 0.025
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())

def s8():
    global speed8
    speed8 = speed8 + 0.025
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())

def s9():
    global speed9
    speed9 = speed9 + 0.025
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())

def s10():
    global speed10
    speed10 = speed10 + 0.025
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())

def s11():
    global speed11
    speed11 = speed11 + 0.025
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())

def s12():
    global speed12
    speed12 = speed12 + 0.025
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())

def s13():
    global speed13
    speed13 = speed13 + 0.025
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())

def s14():
    global speed14
    speed14 = speed14 + 0.025
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())

def s15():
    global speed15
    speed15 = speed15 + 0.025
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())

def s16():
    global speed16
    speed16 = speed16 + 0.025
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())

def s17():
    global speed17
    speed17 = speed17 + 0.025
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())

def s18():
    global speed18
    speed18 = speed18 + 0.025
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())

def s19():
    global speed19
    speed19 = speed19 + 0.025
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())

def s20():
    global speed20
    speed20 = speed20 + 0.025
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())

def s21():
    global speed21
    speed21 = speed21 + 0.025
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())

def s22():
    global speed22
    speed22 = speed22 + 0.025
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())

def s23():
    global speed23
    speed23 = speed23 + 0.025
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())

def s24():
    global speed24
    speed24 = speed24 + 0.025
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())

def s25():
    global speed25
    speed25 = speed25 + 0.025
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())

def s26():
    global speed26
    speed26 = speed26 + 0.025
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())

def s27():
    global speed27
    speed27 = speed27 + 0.025
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())

def s28():
    global speed28
    speed28 = speed28 + 0.025
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())

def s29():
    global speed29
    speed29 = speed29 + 0.025
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())

def s30():
    global speed30
    speed30 = speed30 + 0.025
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())

def s31():
    global speed31
    speed31 = speed31 + 0.025
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())

def s32():
    global speed32
    speed32 = speed32 + 0.025
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())

def s33():
    global speed33
    speed33 = speed33 + 0.025
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())

def s34():
    global speed34
    speed34 = speed34 + 0.025
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())

def s35():
    global speed35
    speed35 = speed35 + 0.025
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())

def s36():
    global speed36
    speed36 = speed36 + 0.025
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())

def s37():
    global speed37
    speed37 = speed37 + 0.025
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())

def s38():
    global speed38
    speed38 = speed38 + 0.025
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())

def s39():
    global speed39
    speed39 = speed39 + 0.025
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())

def s40():
    global speed40
    speed40 = speed40 + 0.025
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())

def s41():
    global speed41
    speed41 = speed41 + 0.025
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())

def s42():
    global speed42
    speed42 = speed42 + 0.025
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())

def s43():
    global speed43
    speed43 = speed43 + 0.025
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())

def s44():
    global speed44
    speed44 = speed44 + 0.025
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())

def s45():
    global speed45
    speed45 = speed45 + 0.025
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())

def s46():
    global speed46
    speed46 = speed46 + 0.025
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())

def s47():
    global speed47
    speed47 = speed47 + 0.025
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())

def s48():
    global speed48
    speed48 = speed48 + 0.025
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())

def s49():
    global speed49
    speed49 = speed49 + 0.025
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())

def s50():
    global speed50
    speed50 = speed50 + 0.025
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())

def s51():
    global speed51
    speed51 = speed51 + 0.025
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())

def s52():
    global speed52
    speed52 = speed52 + 0.025
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())

def s53():
    global speed53
    speed53 = speed53 + 0.025
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())

def s54():
    global speed54
    speed54 = speed54 + 0.025
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())

def s55():
    global speed55
    speed55 = speed55 + 0.025
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())

def s56():
    global speed56
    speed56 = speed56 + 0.025
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())

def s57():
    global speed57
    speed57 = speed57 + 0.025
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())

def s58():
    global speed58
    speed58 = speed58 + 0.025
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())

def s59():
    global speed59
    speed59 = speed59 + 0.025
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())

def s60():
    global speed60
    speed60 = speed60 + 0.025
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())

def s61():
    global speed61
    speed61 = speed61 + 0.025
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())

def s62():
    global speed62
    speed62 = speed62 + 0.025
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())

def s63():
    global speed63
    speed63 = speed63 + 0.025
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())

def s64():
    global speed64
    speed64 = speed64 + 0.025
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())

def s65():
    global speed65
    speed65 = speed65 + 0.025
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())

def s66():
    global speed66
    speed66 = speed66 + 0.025
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())

def s67():
    global speed67
    speed67 = speed67 + 0.025
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())

def s68():
    global speed68
    speed68 = speed68 + 0.025
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())

def s69():
    global speed69
    speed69 = speed69 + 0.025
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())

def s70():
    global speed70
    speed70 = speed70 + 0.025
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())

def s71():
    global speed71
    speed71 = speed71 + 0.025
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())

def s72():
    global speed72
    speed72 = speed72 + 0.025
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())

def s73():
    global speed73
    speed73 = speed73 + 0.025
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())

def s74():
    global speed74
    speed74 = speed74 + 0.025
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())

def s75():
    global speed75
    speed75 = speed75 + 0.025
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())

def s76():
    global speed76
    speed76 = speed76 + 0.025
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())

def s77():
    global speed77
    speed77 = speed77 + 0.025
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())

def s78():
    global speed78
    speed78 = speed78 + 0.025
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())

def s79():
    global speed79
    speed79 = speed79 + 0.025
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())

def s80():
    global speed80
    speed80 = speed80 + 0.025
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())

def s81():
    global speed81
    speed81 = speed81 + 0.025
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())

def s82():
    global speed82
    speed82 = speed82 + 0.025
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())

def s83():
    global speed83
    speed83 = speed83 + 0.025
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())

def s84():
    global speed84
    speed84 = speed84 + 0.025
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())

def s85():
    global speed85
    speed85 = speed85 + 0.025
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())

def s86():
    global speed86
    speed86 = speed86 + 0.025
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())

def s87():
    global speed87
    speed87 = speed87 + 0.025
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())

def s88():
    global speed88
    speed88 = speed88 + 0.025
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())

def s89():
    global speed89
    speed89 = speed89 + 0.025
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())

def s90():
    global speed90
    speed90 = speed90 + 0.025
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())

def s91():
    global speed91
    speed91 = speed91 + 0.025
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())

def s92():
    global speed92
    speed92 = speed92 + 0.025
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())

def s93():
    global speed93
    speed93 = speed93 + 0.025
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())

def s94():
    global speed94
    speed94 = speed94 + 0.025
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())

def s95():
    global speed95
    speed95 = speed95 + 0.025
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())


def repeatup():
    global repeat
    if repeat <= 0.05:
        return
    repeat=repeat - 0.025
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())

def repeatdn():
    global repeat
    repeat = repeat + 0.025
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())

def loopup():
    global loop, counter
    loop=loop + 1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())
    counter=loop

def loopdn():
    global loop, counter
    if loop <= 1:
        return
    loop = loop - 1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())
    counter=loop


def play():

#note 1
    c1.set("cyan")
    nameb0_0.configure(background=c1.get())
    GPIO.output(chan_list, (b0_0var.get(), b0_1var.get(), b0_2var.get(), b0_3var.get(), b0_4var.get(), b0_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed0)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb0_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b0_7var.get() == 1:
        return

#note 2
    c1.set("cyan")
    nameb1_0.configure(background=c1.get())
    GPIO.output(chan_list, (b1_0var.get(),b1_1var.get(),b1_2var.get(),b1_3var.get(),b1_4var.get(),b1_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed1)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb1_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b1_7var.get() == 1:
        return

#note 3
    c1.set("cyan")
    nameb2_0.configure(background=c1.get())
    GPIO.output(chan_list, (b2_0var.get(),b2_1var.get(),b2_2var.get(),b2_3var.get(),b2_4var.get(),b2_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed2)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb2_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b2_7var.get() == 1:
        return

#note 4
    c1.set("cyan")
    nameb3_0.configure(background=c1.get())
    GPIO.output(chan_list, (b3_0var.get(),b3_1var.get(),b3_2var.get(),b3_3var.get(),b3_4var.get(),b3_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed3)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb3_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b3_7var.get() == 1:
        return

#note 5
    c1.set("cyan")
    nameb4_0.configure(background=c1.get())
    GPIO.output(chan_list, (b4_0var.get(),b4_1var.get(),b4_2var.get(),b4_3var.get(),b4_4var.get(),b4_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed4)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb4_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b4_7var.get() == 1:
        return

#note 6
    c1.set("cyan")
    nameb5_0.configure(background=c1.get())
    GPIO.output(chan_list, (b5_0var.get(),b5_1var.get(),b5_2var.get(),b5_3var.get(),b5_4var.get(),b5_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed5)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb5_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b5_7var.get() == 1:
        return

#note 7
    c1.set("cyan")
    nameb6_0.configure(background=c1.get())
    GPIO.output(chan_list, (b6_0var.get(),b6_1var.get(),b6_2var.get(),b6_3var.get(),b6_4var.get(),b6_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed6)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb6_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b6_7var.get() == 1:
        return

#note 8
    c1.set("cyan")
    nameb7_0.configure(background=c1.get())
    GPIO.output(chan_list, (b7_0var.get(),b7_1var.get(),b7_2var.get(),b7_3var.get(),b7_4var.get(),b7_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed7)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb7_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b7_7var.get() == 1:
        return

#note 9
    c1.set("cyan")
    nameb8_0.configure(background=c1.get())
    GPIO.output(chan_list, (b8_0var.get(),b8_1var.get(),b8_2var.get(),b8_3var.get(),b8_4var.get(),b8_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed8)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb8_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b8_7var.get() == 1:
        return

#note 10
    c1.set("cyan")
    nameb9_0.configure(background=c1.get())
    GPIO.output(chan_list, (b9_0var.get(),b9_1var.get(),b9_2var.get(),b9_3var.get(),b9_4var.get(),b9_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed9)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb9_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b9_7var.get() == 1:
        return

#note 11
    c1.set("cyan")
    nameb10_0.configure(background=c1.get())
    GPIO.output(chan_list, (b10_0var.get(),b10_1var.get(),b10_2var.get(),b10_3var.get(),b10_4var.get(),b10_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed10)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb10_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b10_7var.get() == 1:
        return

#note 12
    c1.set("cyan")
    nameb11_0.configure(background=c1.get())
    GPIO.output(chan_list, (b11_0var.get(),b11_1var.get(),b11_2var.get(),b11_3var.get(),b11_4var.get(),b11_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed11)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb11_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b11_7var.get() == 1:
        return

#note 13
    c1.set("cyan")
    nameb12_0.configure(background=c1.get())
    GPIO.output(chan_list, (b12_0var.get(),b12_1var.get(),b12_2var.get(),b12_3var.get(),b12_4var.get(),b12_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed12)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb12_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b12_7var.get() == 1:
        return

#note 14
    c1.set("cyan")
    nameb13_0.configure(background=c1.get())
    GPIO.output(chan_list, (b13_0var.get(),b13_1var.get(),b13_2var.get(),b13_3var.get(),b13_4var.get(),b13_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed13)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb13_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b13_7var.get() == 1:
        return

#note 15
    c1.set("cyan")
    nameb14_0.configure(background=c1.get())
    GPIO.output(chan_list, (b14_0var.get(),b14_1var.get(),b14_2var.get(),b14_3var.get(),b14_4var.get(),b14_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed14)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb14_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b14_7var.get() == 1:
        return

#note 16
    c1.set("cyan")
    nameb15_0.configure(background=c1.get())
    GPIO.output(chan_list, (b15_0var.get(),b15_1var.get(),b15_2var.get(),b15_3var.get(),b15_4var.get(),b15_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed15)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb15_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b15_7var.get() == 1:
        return

#note 17
    c1.set("cyan")
    nameb16_0.configure(background=c1.get())
    GPIO.output(chan_list, (b16_0var.get(),b16_1var.get(),b16_2var.get(),b16_3var.get(),b16_4var.get(),b16_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed16)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb16_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b16_7var.get() == 1:
        return

#note 18
    c1.set("cyan")
    nameb17_0.configure(background=c1.get())
    GPIO.output(chan_list, (b17_0var.get(),b17_1var.get(),b17_2var.get(),b17_3var.get(),b17_4var.get(),b17_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed17)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb17_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b17_7var.get() == 1:
        return

#note 19
    c1.set("cyan")
    nameb18_0.configure(background=c1.get())
    GPIO.output(chan_list, (b18_0var.get(),b18_1var.get(),b18_2var.get(),b18_3var.get(),b18_4var.get(),b18_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed18)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb18_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b18_7var.get() == 1:
        return

#note 20
    c1.set("cyan")
    nameb19_0.configure(background=c1.get())
    GPIO.output(chan_list, (b19_0var.get(),b19_1var.get(),b19_2var.get(),b19_3var.get(),b19_4var.get(),b19_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed19)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb19_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b19_7var.get() == 1:
        return

#note 21
    c1.set("cyan")
    nameb20_0.configure(background=c1.get())
    GPIO.output(chan_list, (b20_0var.get(),b20_1var.get(),b20_2var.get(),b20_3var.get(),b20_4var.get(),b20_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed20)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb20_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b20_7var.get() == 1:
        return

#note 22
    c1.set("cyan")
    nameb21_0.configure(background=c1.get())
    GPIO.output(chan_list, (b21_0var.get(),b21_1var.get(),b21_2var.get(),b21_3var.get(),b21_4var.get(),b21_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed21)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb21_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b21_7var.get() == 1:
        return

#note 23
    c1.set("cyan")
    nameb22_0.configure(background=c1.get())
    GPIO.output(chan_list, (b22_0var.get(),b22_1var.get(),b22_2var.get(),b22_3var.get(),b22_4var.get(),b22_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed22)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb22_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b22_7var.get() == 1:
        return

#note 24
    c1.set("cyan")
    nameb23_0.configure(background=c1.get())
    GPIO.output(chan_list, (b23_0var.get(),b23_1var.get(),b23_2var.get(),b23_3var.get(),b23_4var.get(),b23_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed23)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb23_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b23_7var.get() == 1:
        return


#note 25
    c1.set("cyan")
    nameb24_0.configure(background=c1.get())
    GPIO.output(chan_list, (b24_0var.get(),b24_1var.get(),b24_2var.get(),b24_3var.get(),b24_4var.get(),b24_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed24)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb24_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b24_7var.get() == 1:
        return

#note 26
    c1.set("cyan")
    nameb25_0.configure(background=c1.get())
    GPIO.output(chan_list, (b25_0var.get(),b25_1var.get(),b25_2var.get(),b25_3var.get(),b25_4var.get(),b25_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed25)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb25_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b25_7var.get() == 1:
        return

#note 27
    c1.set("cyan")
    nameb26_0.configure(background=c1.get())
    GPIO.output(chan_list, (b26_0var.get(),b26_1var.get(),b26_2var.get(),b26_3var.get(),b26_4var.get(),b26_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed26)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb26_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b26_7var.get() == 1:
        return

#note 28
    c1.set("cyan")
    nameb27_0.configure(background=c1.get())
    GPIO.output(chan_list, (b27_0var.get(),b27_1var.get(),b27_2var.get(),b27_3var.get(),b27_4var.get(),b27_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed27)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb27_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b27_7var.get() == 1:
        return

#note 29
    c1.set("cyan")
    nameb28_0.configure(background=c1.get())
    GPIO.output(chan_list, (b28_0var.get(),b28_1var.get(),b28_2var.get(),b28_3var.get(),b28_4var.get(),b28_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed28)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb28_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b28_7var.get() == 1:
        return

#note 30
    c1.set("cyan")
    nameb29_0.configure(background=c1.get())
    GPIO.output(chan_list, (b29_0var.get(),b29_1var.get(),b29_2var.get(),b29_3var.get(),b29_4var.get(),b29_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed29)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb29_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b29_7var.get() == 1:
        return

#note 31
    c1.set("cyan")
    nameb30_0.configure(background=c1.get())
    GPIO.output(chan_list, (b30_0var.get(),b30_1var.get(),b30_2var.get(),b30_3var.get(),b30_4var.get(),b30_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed30)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb30_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b30_7var.get() == 1:
        return

#note 32
    c1.set("cyan")
    nameb31_0.configure(background=c1.get())
    GPIO.output(chan_list, (b31_0var.get(),b31_1var.get(),b31_2var.get(),b31_3var.get(),b31_4var.get(),b31_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed31)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb31_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b31_7var.get() == 1:
        return

#note 33
    c1.set("cyan")
    nameb32_0.configure(background=c1.get())
    GPIO.output(chan_list, (b32_0var.get(), b32_1var.get(), b32_2var.get(), b32_3var.get(), b32_4var.get(), b32_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed32)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb32_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b32_7var.get() == 1:
        return

#note 34
    c1.set("cyan")
    nameb33_0.configure(background=c1.get())
    GPIO.output(chan_list, (b33_0var.get(),b33_1var.get(),b33_2var.get(),b33_3var.get(),b33_4var.get(),b33_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed33)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb33_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b33_7var.get() == 1:
        return

#note 35
    c1.set("cyan")
    nameb34_0.configure(background=c1.get())
    GPIO.output(chan_list, (b34_0var.get(),b34_1var.get(),b34_2var.get(),b34_3var.get(),b34_4var.get(),b34_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed34)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb34_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b34_7var.get() == 1:
        return

#note 36
    c1.set("cyan")
    nameb35_0.configure(background=c1.get())
    GPIO.output(chan_list, (b35_0var.get(),b35_1var.get(),b35_2var.get(),b35_3var.get(),b35_4var.get(),b35_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed35)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb35_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b35_7var.get() == 1:
        return

#note 37
    c1.set("cyan")
    nameb36_0.configure(background=c1.get())
    GPIO.output(chan_list, (b36_0var.get(),b36_1var.get(),b36_2var.get(),b36_3var.get(),b36_4var.get(),b36_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed36)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb36_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b36_7var.get() == 1:
        return

#note 38
    c1.set("cyan")
    nameb37_0.configure(background=c1.get())
    GPIO.output(chan_list, (b37_0var.get(),b37_1var.get(),b37_2var.get(),b37_3var.get(),b37_4var.get(),b37_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed37)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb37_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b37_7var.get() == 1:
        return

#note 39
    c1.set("cyan")
    nameb38_0.configure(background=c1.get())
    GPIO.output(chan_list, (b38_0var.get(),b38_1var.get(),b38_2var.get(),b38_3var.get(),b38_4var.get(),b38_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed38)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb38_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b38_7var.get() == 1:
        return

#note 40
    c1.set("cyan")
    nameb39_0.configure(background=c1.get())
    GPIO.output(chan_list, (b39_0var.get(),b39_1var.get(),b39_2var.get(),b39_3var.get(),b39_4var.get(),b39_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed39)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb39_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b39_7var.get() == 1:
        return

#note 41
    c1.set("cyan")
    nameb40_0.configure(background=c1.get())
    GPIO.output(chan_list, (b40_0var.get(),b40_1var.get(),b40_2var.get(),b40_3var.get(),b40_4var.get(),b40_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed40)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb40_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b40_7var.get() == 1:
        return

#note 42
    c1.set("cyan")
    nameb41_0.configure(background=c1.get())
    GPIO.output(chan_list, (b41_0var.get(),b41_1var.get(),b41_2var.get(),b41_3var.get(),b41_4var.get(),b41_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed41)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb41_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b41_7var.get() == 1:
        return

#note 43
    c1.set("cyan")
    nameb42_0.configure(background=c1.get())
    GPIO.output(chan_list, (b42_0var.get(),b42_1var.get(),b42_2var.get(),b42_3var.get(),b42_4var.get(),b42_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed42)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb42_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b42_7var.get() == 1:
        return

#note 44
    c1.set("cyan")
    nameb43_0.configure(background=c1.get())
    GPIO.output(chan_list, (b43_0var.get(),b43_1var.get(),b43_2var.get(),b43_3var.get(),b43_4var.get(),b43_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed43)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb43_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b43_7var.get() == 1:
        return

#note 45
    c1.set("cyan")
    nameb44_0.configure(background=c1.get())
    GPIO.output(chan_list, (b44_0var.get(),b44_1var.get(),b44_2var.get(),b44_3var.get(),b44_4var.get(),b44_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed44)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb44_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b44_7var.get() == 1:
        return

#note 46
    c1.set("cyan")
    nameb45_0.configure(background=c1.get())
    GPIO.output(chan_list, (b45_0var.get(),b45_1var.get(),b45_2var.get(),b45_3var.get(),b45_4var.get(),b45_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed45)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb45_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b45_7var.get() == 1:
        return

#note 47
    c1.set("cyan")
    nameb46_0.configure(background=c1.get())
    GPIO.output(chan_list, (b46_0var.get(),b46_1var.get(),b46_2var.get(),b46_3var.get(),b46_4var.get(),b46_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed46)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb46_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b46_7var.get() == 1:
        return

#note 48
    c1.set("cyan")
    nameb47_0.configure(background=c1.get())
    GPIO.output(chan_list, (b47_0var.get(),b47_1var.get(),b47_2var.get(),b47_3var.get(),b47_4var.get(),b47_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed47)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb47_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b47_7var.get() == 1:
        return

#note 49
    c1.set("cyan")
    nameb48_0.configure(background=c1.get())
    GPIO.output(chan_list, (b48_0var.get(),b48_1var.get(),b48_2var.get(),b48_3var.get(),b48_4var.get(),b48_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed48)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb48_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b48_7var.get() == 1:
        return

#note 50
    c1.set("cyan")
    nameb49_0.configure(background=c1.get())
    GPIO.output(chan_list, (b49_0var.get(),b49_1var.get(),b49_2var.get(),b49_3var.get(),b49_4var.get(),b49_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed49)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb49_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b49_7var.get() == 1:
        return

#note 51
    c1.set("cyan")
    nameb50_0.configure(background=c1.get())
    GPIO.output(chan_list, (b50_0var.get(),b50_1var.get(),b50_2var.get(),b50_3var.get(),b50_4var.get(),b50_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed50)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb50_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b50_7var.get() == 1:
        return

#note 52
    c1.set("cyan")
    nameb51_0.configure(background=c1.get())
    GPIO.output(chan_list, (b51_0var.get(),b51_1var.get(),b51_2var.get(),b51_3var.get(),b51_4var.get(),b51_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed51)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb51_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b51_7var.get() == 1:
        return

#note 53
    c1.set("cyan")
    nameb52_0.configure(background=c1.get())
    GPIO.output(chan_list, (b52_0var.get(),b52_1var.get(),b52_2var.get(),b52_3var.get(),b52_4var.get(),b52_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed52)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb52_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b52_7var.get() == 1:
        return

#note 54
    c1.set("cyan")
    nameb53_0.configure(background=c1.get())
    GPIO.output(chan_list, (b53_0var.get(),b53_1var.get(),b53_2var.get(),b53_3var.get(),b53_4var.get(),b53_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed53)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb53_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b53_7var.get() == 1:
        return

#note 55
    c1.set("cyan")
    nameb54_0.configure(background=c1.get())
    GPIO.output(chan_list, (b54_0var.get(),b54_1var.get(),b54_2var.get(),b54_3var.get(),b54_4var.get(),b54_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed54)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb54_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b54_7var.get() == 1:
        return

#note 56
    c1.set("cyan")
    nameb55_0.configure(background=c1.get())
    GPIO.output(chan_list, (b55_0var.get(),b55_1var.get(),b55_2var.get(),b55_3var.get(),b55_4var.get(),b55_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed55)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb55_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b55_7var.get() == 1:
        return

#note 57
    c1.set("cyan")
    nameb56_0.configure(background=c1.get())
    GPIO.output(chan_list, (b56_0var.get(),b56_1var.get(),b56_2var.get(),b56_3var.get(),b56_4var.get(),b56_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed56)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb56_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b56_7var.get() == 1:
        return

#note 58
    c1.set("cyan")
    nameb57_0.configure(background=c1.get())
    GPIO.output(chan_list, (b57_0var.get(),b57_1var.get(),b57_2var.get(),b57_3var.get(),b57_4var.get(),b57_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed57)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb57_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b57_7var.get() == 1:
        return

#note 59
    c1.set("cyan")
    nameb58_0.configure(background=c1.get())
    GPIO.output(chan_list, (b58_0var.get(),b58_1var.get(),b58_2var.get(),b58_3var.get(),b58_4var.get(),b58_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed58)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb58_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b58_7var.get() == 1:
        return

#note 60
    c1.set("cyan")
    nameb59_0.configure(background=c1.get())
    GPIO.output(chan_list, (b59_0var.get(),b59_1var.get(),b59_2var.get(),b59_3var.get(),b59_4var.get(),b59_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed59)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb59_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b59_7var.get() == 1:
        return

#note 61
    c1.set("cyan")
    nameb60_0.configure(background=c1.get())
    GPIO.output(chan_list, (b60_0var.get(),b60_1var.get(),b60_2var.get(),b60_3var.get(),b60_4var.get(),b60_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed60)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb60_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b60_7var.get() == 1:
        return

#note 62
    c1.set("cyan")
    nameb61_0.configure(background=c1.get())
    GPIO.output(chan_list, (b61_0var.get(),b61_1var.get(),b61_2var.get(),b61_3var.get(),b61_4var.get(),b61_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed61)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb61_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b61_7var.get() == 1:
        return

#note 63
    c1.set("cyan")
    nameb62_0.configure(background=c1.get())
    GPIO.output(chan_list, (b62_0var.get(),b62_1var.get(),b62_2var.get(),b62_3var.get(),b62_4var.get(),b62_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed62)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb62_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b62_7var.get() == 1:
        return

#note 64
    c1.set("cyan")
    nameb63_0.configure(background=c1.get())
    GPIO.output(chan_list, (b63_0var.get(),b63_1var.get(),b63_2var.get(),b63_3var.get(),b63_4var.get(),b63_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed63)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb63_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b63_7var.get() == 1:
        return

#note 65
    c1.set("cyan")
    nameb64_0.configure(background=c1.get())
    GPIO.output(chan_list, (b64_0var.get(), b64_1var.get(), b64_2var.get(), b64_3var.get(), b64_4var.get(), b64_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed64)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb64_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b64_7var.get() == 1:
        return

#note 66
    c1.set("cyan")
    nameb65_0.configure(background=c1.get())
    GPIO.output(chan_list, (b65_0var.get(),b65_1var.get(),b65_2var.get(),b65_3var.get(),b65_4var.get(),b65_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed65)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb65_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b65_7var.get() == 1:
        return

#note 67
    c1.set("cyan")
    nameb66_0.configure(background=c1.get())
    GPIO.output(chan_list, (b66_0var.get(),b66_1var.get(),b66_2var.get(),b66_3var.get(),b66_4var.get(),b66_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed66)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb66_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b66_7var.get() == 1:
        return

#note 68
    c1.set("cyan")
    nameb67_0.configure(background=c1.get())
    GPIO.output(chan_list, (b67_0var.get(),b67_1var.get(),b67_2var.get(),b67_3var.get(),b67_4var.get(),b67_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed67)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb67_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b67_7var.get() == 1:
        return

#note 69
    c1.set("cyan")
    nameb68_0.configure(background=c1.get())
    GPIO.output(chan_list, (b68_0var.get(),b68_1var.get(),b68_2var.get(),b68_3var.get(),b68_4var.get(),b68_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed68)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb68_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b68_7var.get() == 1:
        return

#note 70
    c1.set("cyan")
    nameb69_0.configure(background=c1.get())
    GPIO.output(chan_list, (b69_0var.get(),b69_1var.get(),b69_2var.get(),b69_3var.get(),b69_4var.get(),b69_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed69)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb69_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b69_7var.get() == 1:
        return

#note 71
    c1.set("cyan")
    nameb70_0.configure(background=c1.get())
    GPIO.output(chan_list, (b70_0var.get(),b70_1var.get(),b70_2var.get(),b70_3var.get(),b70_4var.get(),b70_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed70)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb70_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b70_7var.get() == 1:
        return

#note 72
    c1.set("cyan")
    nameb71_0.configure(background=c1.get())
    GPIO.output(chan_list, (b71_0var.get(),b71_1var.get(),b71_2var.get(),b71_3var.get(),b71_4var.get(),b71_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed71)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb71_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b71_7var.get() == 1:
        return

#note 73
    c1.set("cyan")
    nameb72_0.configure(background=c1.get())
    GPIO.output(chan_list, (b72_0var.get(),b72_1var.get(),b72_2var.get(),b72_3var.get(),b72_4var.get(),b72_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed72)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb72_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b72_7var.get() == 1:
        return

#note 74
    c1.set("cyan")
    nameb73_0.configure(background=c1.get())
    GPIO.output(chan_list, (b73_0var.get(),b73_1var.get(),b73_2var.get(),b73_3var.get(),b73_4var.get(),b73_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed73)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb73_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b73_7var.get() == 1:
        return

#note 75
    c1.set("cyan")
    nameb74_0.configure(background=c1.get())
    GPIO.output(chan_list, (b74_0var.get(),b74_1var.get(),b74_2var.get(),b74_3var.get(),b74_4var.get(),b74_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed74)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb74_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b74_7var.get() == 1:
        return

#note 76
    c1.set("cyan")
    nameb75_0.configure(background=c1.get())
    GPIO.output(chan_list, (b75_0var.get(),b75_1var.get(),b75_2var.get(),b75_3var.get(),b75_4var.get(),b75_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed75)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb75_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b75_7var.get() == 1:
        return

#note 77
    c1.set("cyan")
    nameb76_0.configure(background=c1.get())
    GPIO.output(chan_list, (b76_0var.get(),b76_1var.get(),b76_2var.get(),b76_3var.get(),b76_4var.get(),b76_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed76)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb76_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b76_7var.get() == 1:
        return

#note 78
    c1.set("cyan")
    nameb77_0.configure(background=c1.get())
    GPIO.output(chan_list, (b77_0var.get(),b77_1var.get(),b77_2var.get(),b77_3var.get(),b77_4var.get(),b77_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed77)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb77_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b77_7var.get() == 1:
        return

#note 79
    c1.set("cyan")
    nameb78_0.configure(background=c1.get())
    GPIO.output(chan_list, (b78_0var.get(),b78_1var.get(),b78_2var.get(),b78_3var.get(),b78_4var.get(),b78_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed78)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb78_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b78_7var.get() == 1:
        return

#note 80
    c1.set("cyan")
    nameb79_0.configure(background=c1.get())
    GPIO.output(chan_list, (b79_0var.get(),b79_1var.get(),b79_2var.get(),b79_3var.get(),b79_4var.get(),b79_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed79)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb79_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b79_7var.get() == 1:
        return

#note 81
    c1.set("cyan")
    nameb80_0.configure(background=c1.get())
    GPIO.output(chan_list, (b80_0var.get(),b80_1var.get(),b80_2var.get(),b80_3var.get(),b80_4var.get(),b80_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed80)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb80_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b80_7var.get() == 1:
        return

#note 82
    c1.set("cyan")
    nameb81_0.configure(background=c1.get())
    GPIO.output(chan_list, (b81_0var.get(),b81_1var.get(),b81_2var.get(),b81_3var.get(),b81_4var.get(),b81_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed81)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb81_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b81_7var.get() == 1:
        return

#note 83
    c1.set("cyan")
    nameb82_0.configure(background=c1.get())
    GPIO.output(chan_list, (b82_0var.get(),b82_1var.get(),b82_2var.get(),b82_3var.get(),b82_4var.get(),b82_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed82)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb82_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b82_7var.get() == 1:
        return

#note 84
    c1.set("cyan")
    nameb83_0.configure(background=c1.get())
    GPIO.output(chan_list, (b83_0var.get(),b83_1var.get(),b83_2var.get(),b83_3var.get(),b83_4var.get(),b83_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed83)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb83_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b83_7var.get() == 1:
        return

#note 85
    c1.set("cyan")
    nameb84_0.configure(background=c1.get())
    GPIO.output(chan_list, (b84_0var.get(),b84_1var.get(),b84_2var.get(),b84_3var.get(),b84_4var.get(),b84_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed84)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb84_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b84_7var.get() == 1:
        return

#note 86
    c1.set("cyan")
    nameb85_0.configure(background=c1.get())
    GPIO.output(chan_list, (b85_0var.get(),b85_1var.get(),b85_2var.get(),b85_3var.get(),b85_4var.get(),b85_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed85)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb85_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b85_7var.get() == 1:
        return

#note 87
    c1.set("cyan")
    nameb86_0.configure(background=c1.get())
    GPIO.output(chan_list, (b86_0var.get(),b86_1var.get(),b86_2var.get(),b86_3var.get(),b86_4var.get(),b86_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed86)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb86_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b86_7var.get() == 1:
        return

#note 88
    c1.set("cyan")
    nameb87_0.configure(background=c1.get())
    GPIO.output(chan_list, (b87_0var.get(),b87_1var.get(),b87_2var.get(),b87_3var.get(),b87_4var.get(),b87_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed87)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb87_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b87_7var.get() == 1:
        return

#note 89
    c1.set("cyan")
    nameb88_0.configure(background=c1.get())
    GPIO.output(chan_list, (b88_0var.get(),b88_1var.get(),b88_2var.get(),b88_3var.get(),b88_4var.get(),b88_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed88)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb88_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b88_7var.get() == 1:
        return

#note 90
    c1.set("cyan")
    nameb89_0.configure(background=c1.get())
    GPIO.output(chan_list, (b89_0var.get(),b89_1var.get(),b89_2var.get(),b89_3var.get(),b89_4var.get(),b89_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed89)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb89_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b89_7var.get() == 1:
        return

#note 91
    c1.set("cyan")
    nameb90_0.configure(background=c1.get())
    GPIO.output(chan_list, (b90_0var.get(),b90_1var.get(),b90_2var.get(),b90_3var.get(),b90_4var.get(),b90_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed90)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb90_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b90_7var.get() == 1:
        return

#note 92
    c1.set("cyan")
    nameb91_0.configure(background=c1.get())
    GPIO.output(chan_list, (b91_0var.get(),b91_1var.get(),b91_2var.get(),b91_3var.get(),b91_4var.get(),b91_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed91)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb91_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b91_7var.get() == 1:
        return

#note 93
    c1.set("cyan")
    nameb92_0.configure(background=c1.get())
    GPIO.output(chan_list, (b92_0var.get(),b92_1var.get(),b92_2var.get(),b92_3var.get(),b92_4var.get(),b92_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed92)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb92_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b92_7var.get() == 1:
        return

#note 94
    c1.set("cyan")
    nameb93_0.configure(background=c1.get())
    GPIO.output(chan_list, (b93_0var.get(),b93_1var.get(),b93_2var.get(),b93_3var.get(),b93_4var.get(),b93_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed93)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb93_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b93_7var.get() == 1:
        return

#note 95
    c1.set("cyan")
    nameb94_0.configure(background=c1.get())
    GPIO.output(chan_list, (b94_0var.get(),b94_1var.get(),b94_2var.get(),b94_3var.get(),b94_4var.get(),b94_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed94)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb94_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b94_7var.get() == 1:
        return

#note 96
    c1.set("cyan")
    nameb95_0.configure(background=c1.get())
    GPIO.output(chan_list, (b95_0var.get(),b95_1var.get(),b95_2var.get(),b95_3var.get(),b95_4var.get(),b95_5var.get()))
    GPIO.output(enable, 1)
    time.sleep(0.0005)
    GPIO.output(enable, 0)
    GPIO.output(gate, 1)
    time.sleep(speed95)
    GPIO.output(gate, 0)
    c1.set("gray84")
    nameb95_0.configure(background=c1.get())
    if stop_var.get()==1:
        return
    if b95_7var.get() == 1:
        return


def start():
    if stop_var.get()== 1:
        stop_0.invoke()

    def loop_0():

        def loop_1():
            global counter, loop
            if stop_var.get()== 1:
                counter=loop
                return
            play()
            time.sleep(repeat)
            counter=counter-1
            if counter==1:
                counter=loop
                return
            else:
                loop_1()
        loop_1()

    def run():
        global counter, loop
        while True:
            if stop_var.get()== 1:
                stop_0.invoke()
                return

            if loop_var.get() == 1:
                counter=loop
                if counter==1:
                    None
                else:
                    loop_0()

            if b0_6var.get() == 1:
                
                time.sleep(repeat)
                play()
                GPIO.output(enable, 0)
                GPIO.output(gate, 0)
            else:
                if stop_var.get()== 1:
                    counter=loop
                    stop_0.invoke()
                    return
                play()
                GPIO.output(enable, 0)
                GPIO.output(gate, 0)
                return
    t = threading.Thread(target=run)
    t.daemon=True
    t.start()


def stop():

    def halt():
        if stop_var.get() == 0:
            stop_0.invoke()

    t1 = threading.Thread(target=halt)
    t1.daemon=True
    t1.start()

# to ensure only one loop button can be selected
def toggle_inf():
    if loop_var.get() and b0_6var.get() == 1:
        b0_6.invoke()

def toggle_loop():
    if loop_var.get() and b0_6var.get() == 1:
        loop_0.invoke()

#allows Drum Trigger to start and stop sequence 
def synthstart(trig):
    start()

def synthstop(trig):
    stop()

#tracking tempo
def exttrackup(trig):
    trackup()

def exttrackdn(trig):
    trackdn()

def haltcount():
    global haltno
    haltno=1
    if b0_7var.get()>0:
        return
    haltno=2
    if b1_7var.get()>0:
        return
    haltno=3
    if b2_7var.get()>0:
        return
    haltno=4
    if b3_7var.get()>0:
        return
    haltno=5
    if b4_7var.get()>0:
        return
    haltno=6
    if b5_7var.get()>0:
        return
    haltno=7
    if b6_7var.get()>0:
        return
    haltno=8
    if b7_7var.get()>0:
        return
    haltno=9
    if b8_7var.get()>0:
        return
    haltno=10
    if b9_7var.get()>0:
        return
    haltno=11
    if b10_7var.get()>0:
        return
    haltno=12
    if b11_7var.get()>0:
        return
    haltno=13
    if b12_7var.get()>0:
        return
    haltno=14
    if b13_7var.get()>0:
        return
    haltno=15
    if b14_7var.get()>0:
        return
    haltno=16
    if b15_7var.get()>0:
        return
    haltno=17
    if b16_7var.get()>0:
        return
    haltno=18
    if b17_7var.get()>0:
        return
    haltno=19
    if b18_7var.get()>0:
        return
    haltno=20
    if b19_7var.get()>0:
        return
    haltno=21
    if b20_7var.get()>0:
        return
    haltno=22
    if b21_7var.get()>0:
        return
    haltno=23
    if b22_7var.get()>0:
        return
    haltno=24
    if b23_7var.get()>0:
        return
    haltno=25
    if b24_7var.get()>0:
        return
    haltno=26
    if b25_7var.get()>0:
        return
    haltno=27
    if b26_7var.get()>0:
        return
    haltno=28
    if b27_7var.get()>0:
        return
    haltno=29
    if b28_7var.get()>0:
        return
    haltno=30
    if b29_7var.get()>0:
        return
    haltno=31
    if b30_7var.get()>0:
        return
    haltno=32
    if b31_7var.get()>0:
        return
    haltno=33
    if b32_7var.get()>0:
        return
    haltno=34
    if b33_7var.get()>0:
        return
    haltno=35
    if b34_7var.get()>0:
        return
    haltno=36
    if b35_7var.get()>0:
        return
    haltno=37
    if b36_7var.get()>0:
        return
    haltno=38
    if b37_7var.get()>0:
        return
    haltno=39
    if b40_7var.get()>0:
        return
    haltno=40
    if b39_7var.get()>0:
        return
    haltno=41
    if b40_7var.get()>0:
        return
    haltno=42
    if b41_7var.get()>0:
        return
    haltno=43
    if b42_7var.get()>0:
        return
    haltno=44
    if b43_7var.get()>0:
        return
    haltno=45
    if b44_7var.get()>0:
        return
    haltno=46
    if b45_7var.get()>0:
        return
    haltno=47
    if b46_7var.get()>0:
        return
    haltno=48
    if b47_7var.get()>0:
        return
    haltno=49
    if b48_7var.get()>0:
        return
    haltno=50
    if b49_7var.get()>0:
        return
    haltno=51
    if b50_7var.get()>0:
        return
    haltno=52
    if b51_7var.get()>0:
        return
    haltno=53
    if b52_7var.get()>0:
        return
    haltno=54
    if b53_7var.get()>0:
        return
    haltno=55
    if b54_7var.get()>0:
        return
    haltno=56
    if b55_7var.get()>0:
        return
    haltno=57
    if b56_7var.get()>0:
        return
    haltno=58
    if b57_7var.get()>0:
        return
    haltno=59
    if b58_7var.get()>0:
        return
    haltno=60
    if b59_7var.get()>0:
        return
    haltno=61
    if b60_7var.get()>0:
        return
    haltno=62
    if b61_7var.get()>0:
        return
    haltno=63
    if b62_7var.get()>0:
        return
    haltno=64
    if b63_7var.get()>0:
        return
    haltno=65
    if b64_7var.get()>0:
        return
    haltno=66
    if b65_7var.get()>0:
        return
    haltno=67
    if b66_7var.get()>0:
        return
    haltno=68
    if b67_7var.get()>0:
        return
    haltno=69
    if b68_7var.get()>0:
        return
    haltno=70
    if b69_7var.get()>0:
        return
    haltno=71
    if b70_7var.get()>0:
        return
    haltno=72
    if b71_7var.get()>0:
        return
    haltno=73
    if b72_7var.get()>0:
        return
    haltno=74
    if b73_7var.get()>0:
        return
    haltno=75
    if b74_7var.get()>0:
        return
    haltno=76
    if b75_7var.get()>0:
        return
    haltno=77
    if b66_7var.get()>0:
        return
    haltno=78
    if b77_7var.get()>0:
        return
    haltno=79
    if b78_7var.get()>0:
        return
    haltno=80
    if b79_7var.get()>0:
        return
    haltno=81
    if b80_7var.get()>0:
        return
    haltno=82
    if b81_7var.get()>0:
        return
    haltno=83
    if b82_7var.get()>0:
        return
    haltno=84
    if b83_7var.get()>0:
        return
    haltno=85
    if b84_7var.get()>0:
        return
    haltno=86
    if b85_7var.get()>0:
        return
    haltno=87
    if b86_7var.get()>0:
        return
    haltno=88
    if b87_7var.get()>0:
        return
    haltno=89
    if b88_7var.get()>0:
        return
    haltno=90
    if b89_7var.get()>0:
        return
    haltno=91
    if b90_7var.get()>0:
        return
    haltno=92
    if b91_7var.get()>0:
        return
    haltno=93
    if b92_7var.get()>0:
        return
    haltno=94
    if b93_7var.get()>0:
        return
    haltno=95
    if b94_7var.get()>0:
        return
    haltno=96
    if b95_7var.get()>0:
        return

def trackup():
    haltcount()
    trackno=0
    if trackno==haltno:
        return
    else:
        trackno=1
        f0()
    if trackno==haltno:
        return
    else:
        trackno=2
        f1()
    if trackno==haltno:
        return
    else:
        trackno=3
        f2()
    if trackno==haltno:    
        return
    else:
        trackno=4
        f3()
    if trackno==haltno:
        return
    else:
        trackno=5
        f4()
    if trackno==haltno:
        return
    else:
        trackno=6
        f5()
    if trackno==haltno:
        return
    else:
        trackno=7
        f6()
    if trackno==haltno:
        return
    else:
        trackno=8
        f7()
    if trackno==haltno:
        return
    else:
        trackno=9
        f8()
    if trackno==haltno:
        return
    else:
        trackno=10
        f9()
    if trackno==haltno:
        return
    else:
        trackno=11
        f10()
    if trackno==haltno:
        return
    else:
        trackno=12
        f11()
    if trackno==haltno:
        return
    else:
        trackno=13
        f12()
    if trackno==haltno:
        return
    else:
        trackno=14
        f13()
    if trackno==haltno:
        return
    else:
        trackno=15
        f14()
    if trackno==haltno:
        return
    else:
        trackno=16
        f15()
    if trackno==haltno:
        return
    else:
        trackno=17
        f16()
    if trackno==haltno:
        return
    else:
        trackno=18
        f17()
    if trackno==haltno:
        return
    else:
        trackno=19
        f18()
    if trackno==haltno:
        return
    else:
        trackno=20
        f19()
    if trackno==haltno:
        return
    else:
        trackno=21
        f20()
    if trackno==haltno:
        return
    else:
        trackno=22
        f21()
    if trackno==haltno:
        return
    else:
        trackno=23
        f22()
    if trackno==haltno:
        return
    else:
        trackno=24
        f23()
    if trackno==haltno:
        return
    else:
        trackno=25
        f24()
    if trackno==haltno:
        return
    else:
        trackno=26
        f25()
    if trackno==haltno:
        return
    else:
        trackno=27
        f26()
    if trackno==haltno:
        return
    else:
        trackno=28
        f27()
    if trackno==haltno:
        return
    else:
        trackno=29
        f28()
    if trackno==haltno:
        return
    else:
        trackno=30
        f29()
    if trackno==haltno:
        return
    else:
        trackno=31
        f30()
    if trackno==haltno:
        return
    else:
        trackno=32
        f31()
    if trackno==haltno:
        return
    else:
        trackno=33
        f32()
    if trackno==haltno:
        return
    else:
        trackno=34
        f33()
    if trackno==haltno:
        return
    else:
        trackno=35
        f34()
    if trackno==haltno:
        return
    else:
        trackno=36
        f35()
    if trackno==haltno:
        return
    else:
        trackno=37
        f36()
    if trackno==haltno:
        return
    else:
        trackno=38
        f37()
    if trackno==haltno:
        return
    else:
        trackno=39
        f38()
    if trackno==haltno:
        return
    else:
        trackno=40
        f39()
    if trackno==haltno:
        return
    else:
        trackno=41
        f40()
    if trackno==haltno:
        return
    else:
        trackno=42
        f41()
    if trackno==haltno:
        return
    else:
        trackno=43
        f42()
    if trackno==haltno:
        return
    else:
        trackno=44
        f43()
    if trackno==haltno:
        return
    else:
        trackno=45
        f44()
    if trackno==haltno:
        return
    else:
        trackno=46
        f45()
    if trackno==haltno:
        return
    else:
        trackno=47
        f46()
    if trackno==haltno:
        return
    else:
        trackno=48
        f47()
    if trackno==haltno:
        return
    else:
        trackno=49
        f48()
    if trackno==haltno:
        return
    else:
        trackno=50
        f49()
    if trackno==haltno:
        return
    else:
        trackno=51
        f50()
    if trackno==haltno:
        return
    else:
        trackno=52
        f51()
    if trackno==haltno:
        return
    else:
        trackno=53
        f52()
    if trackno==haltno:
        return
    else:
        trackno=54
        f53()
    if trackno==haltno:
        return
    else:
        trackno=55
        f54()
    if trackno==haltno:
        return
    else:
        trackno=56
        f55()
    if trackno==haltno:
        return
    else:
        trackno=57
        f56()
    if trackno==haltno:
        return
    else:
        trackno=58
        f57()
    if trackno==haltno:
        return
    else:
        trackno=59
        f58()
    if trackno==haltno:
        return
    else:
        trackno=60
        f59()
    if trackno==haltno:
        return
    else:
        trackno=61
        f60()
    if trackno==haltno:
        return
    else:
        trackno=62
        f61()
    if trackno==haltno:
        return
    else:
        trackno=63
        f62()
    if trackno==haltno:
        return
    else:
        trackno=64
        f63()
    if trackno==haltno:
        return
    else:
        trackno=65
        f64()
    if trackno==haltno:
        return
    else:
        trackno=66
        f65()
    if trackno==haltno:
        return
    else:
        trackno=67
        f66()
    if trackno==haltno:
        return
    else:
        trackno=68
        f67()
    if trackno==haltno:
        return
    else:
        trackno=69
        f68()
    if trackno==haltno:
        return
    else:
        trackno=70
        f69()    
    if trackno==haltno:
        return
    else:
        trackno=71
        f70()
    if trackno==haltno:
        return
    else:
        trackno=72
        f71()
    if trackno==haltno:
        return
    else:
        trackno=73
        f72()
    if trackno==haltno:
        return
    else:
        trackno=74
        f73()
    if trackno==haltno:
        return
    else:
        trackno=75
        f74()
    if trackno==haltno:
        return
    else:
        trackno=76
        f75()
    if trackno==haltno:
        return
    else:
        trackno=77
        f76()
    if trackno==haltno:
        return
    else:
        trackno=78
        f77()
    if trackno==haltno:
        return
    else:
        trackno=79
        f78()
    if trackno==haltno:
        return
    else:
        trackno=80
        f79()
    if trackno==haltno:
        return
    else:
        trackno=81
        f80()
    if trackno==haltno:
        return
    else:
        trackno=82
        f81()
    if trackno==haltno:
        return
    else:
        trackno=83
        f82()
    if trackno==haltno:
        return
    else:
        trackno=84
        f83()
    if trackno==haltno:
        return
    else:
        trackno=85
        f84()
    if trackno==haltno:
        return
    else:
        trackno=86
        f85()
    if trackno==haltno:
        return
    else:
        trackno=86
        f86()
    if trackno==haltno:
        return
    else:
        trackno=87
        f87()
    if trackno==haltno:
        return
    else:
        trackno=88
        f88()
    if trackno==haltno:
        return
    else:
        trackno=89
        f89()
    if trackno==haltno:
        return
    else:
        trackno=90
        f90()
    if trackno==haltno:
        return
    else:
        trackno=92
        f91()
    if trackno==haltno:
        return
    else:
        trackno=93
        f92()
    if trackno==haltno:
        return
    else:
        trackno=94
        f93()
    if trackno==haltno:
        return
    else:
        trackno=95
        f94()
    if trackno==haltno:
        return
    else:
        trackno=96
        f95()

def trackdn():
    haltcount()
    trackno=0
    if trackno==haltno:
        return
    else:
        trackno=1
        s0()
    if trackno==haltno:
        return
    else:
        trackno=2
        s1()
    if trackno==haltno:
        return
    else:
        trackno=3
        s2()
    if trackno==haltno:    
        return
    else:
        trackno=4
        s3()
    if trackno==haltno:
        return
    else:
        trackno=5
        s4()
    if trackno==haltno:
        return
    else:
        trackno=6
        s5()
    if trackno==haltno:
        return
    else:
        trackno=7
        s6()
    if trackno==haltno:
        return
    else:
        trackno=8
        s7()
    if trackno==haltno:
        return
    else:
        trackno=9
        s8()
    if trackno==haltno:
        return
    else:
        trackno=10
        s9()
    if trackno==haltno:
        return
    else:
        trackno=11
        s10()
    if trackno==haltno:
        return
    else:
        trackno=12
        s11()
    if trackno==haltno:
        return
    else:
        trackno=13
        s12()
    if trackno==haltno:
        return
    else:
        trackno=14
        s13()
    if trackno==haltno:
        return
    else:
        trackno=15
        s14()
    if trackno==haltno:
        return
    else:
        trackno=16
        s15()
    if trackno==haltno:
        return
    else:
        trackno=17
        s16()
    if trackno==haltno:
        return
    else:
        trackno=18
        s17()
    if trackno==haltno:
        return
    else:
        trackno=19
        s18()
    if trackno==haltno:
        return
    else:
        trackno=20
        s19()
    if trackno==haltno:
        return
    else:
        trackno=21
        s20()
    if trackno==haltno:
        return
    else:
        trackno=22
        s21()
    if trackno==haltno:
        return
    else:
        trackno=23
        s22()
    if trackno==haltno:
        return
    else:
        trackno=24
        s23()
    if trackno==haltno:
        return
    else:
        trackno=25
        s24()
    if trackno==haltno:
        return
    else:
        trackno=26
        s25()
    if trackno==haltno:
        return
    else:
        trackno=27
        s26()
    if trackno==haltno:
        return
    else:
        trackno=28
        s27()
    if trackno==haltno:
        return
    else:
        trackno=29
        s28()
    if trackno==haltno:
        return
    else:
        trackno=30
        s29()
    if trackno==haltno:
        return
    else:
        trackno=31
        s30()
    if trackno==haltno:
        return
    else:
        trackno=32
        s31()
    if trackno==haltno:
        return
    else:
        trackno=33
        s32()
    if trackno==haltno:
        return
    else:
        trackno=34
        s33()
    if trackno==haltno:
        return
    else:
        trackno=35
        s34()
    if trackno==haltno:
        return
    else:
        trackno=36
        s35()
    if trackno==haltno:
        return
    else:
        trackno=37
        s36()
    if trackno==haltno:
        return
    else:
        trackno=38
        s37()
    if trackno==haltno:
        return
    else:
        trackno=39
        s38()
    if trackno==haltno:
        return
    else:
        trackno=40
        s39()
    if trackno==haltno:
        return
    else:
        trackno=41
        s40()
    if trackno==haltno:
        return
    else:
        trackno=42
        s41()
    if trackno==haltno:
        return
    else:
        trackno=43
        s42()
    if trackno==haltno:
        return
    else:
        trackno=44
        s43()
    if trackno==haltno:
        return
    else:
        trackno=45
        s44()
    if trackno==haltno:
        return
    else:
        trackno=46
        s45()
    if trackno==haltno:
        return
    else:
        trackno=47
        s46()
    if trackno==haltno:
        return
    else:
        trackno=48
        s47()
    if trackno==haltno:
        return
    else:
        trackno=49
        s48()
    if trackno==haltno:
        return
    else:
        trackno=50
        s49()
    if trackno==haltno:
        return
    else:
        trackno=51
        s50()
    if trackno==haltno:
        return
    else:
        trackno=52
        s51()
    if trackno==haltno:
        return
    else:
        trackno=53
        s52()
    if trackno==haltno:
        return
    else:
        trackno=54
        s53()
    if trackno==haltno:
        return
    else:
        trackno=55
        s54()
    if trackno==haltno:
        return
    else:
        trackno=56
        s55()
    if trackno==haltno:
        return
    else:
        trackno=57
        s56()
    if trackno==haltno:
        return
    else:
        trackno=58
        s57()
    if trackno==haltno:
        return
    else:
        trackno=59
        s58()
    if trackno==haltno:
        return
    else:
        trackno=60
        s59()
    if trackno==haltno:
        return
    else:
        trackno=61
        s60()
    if trackno==haltno:
        return
    else:
        trackno=62
        s61()
    if trackno==haltno:
        return
    else:
        trackno=63
        s62()
    if trackno==haltno:
        return
    else:
        trackno=64
        s63()
    if trackno==haltno:
        return
    else:
        trackno=65
        s64()
    if trackno==haltno:
        return
    else:
        trackno=66
        s65()
    if trackno==haltno:
        return
    else:
        trackno=67
        s66()
    if trackno==haltno:
        return
    else:
        trackno=68
        s67()
    if trackno==haltno:
        return
    else:
        trackno=69
        s68()
    if trackno==haltno:
        return
    else:
        trackno=70
        s69()    
    if trackno==haltno:
        return
    else:
        trackno=71
        s70()
    if trackno==haltno:
        return
    else:
        trackno=72
        s71()
    if trackno==haltno:
        return
    else:
        trackno=73
        s72()
    if trackno==haltno:
        return
    else:
        trackno=74
        s73()
    if trackno==haltno:
        return
    else:
        trackno=75
        s74()
    if trackno==haltno:
        return
    else:
        trackno=76
        s75()
    if trackno==haltno:
        return
    else:
        trackno=77
        s76()
    if trackno==haltno:
        return
    else:
        trackno=78
        s77()
    if trackno==haltno:
        return
    else:
        trackno=79
        s78()
    if trackno==haltno:
        return
    else:
        trackno=80
        s79()
    if trackno==haltno:
        return
    else:
        trackno=81
        s80()
    if trackno==haltno:
        return
    else:
        trackno=82
        s81()
    if trackno==haltno:
        return
    else:
        trackno=83
        s82()
    if trackno==haltno:
        return
    else:
        trackno=84
        s83()
    if trackno==haltno:
        return
    else:
        trackno=85
        s84()
    if trackno==haltno:
        return
    else:
        trackno=86
        s85()
    if trackno==haltno:
        return
    else:
        trackno=86
        s86()
    if trackno==haltno:
        return
    else:
        trackno=87
        s87()
    if trackno==haltno:
        return
    else:
        trackno=88
        s88()
    if trackno==haltno:
        return
    else:
        trackno=89
        s89()
    if trackno==haltno:
        return
    else:
        trackno=90
        s90()
    if trackno==haltno:
        return
    else:
        trackno=92
        s91()
    if trackno==haltno:
        return
    else:
        trackno=93
        s92()
    if trackno==haltno:
        return
    else:
        trackno=94
        s93()
    if trackno==haltno:
        return
    else:
        trackno=95
        s94()
    if trackno==haltno:
        return
    else:
        trackno=96
        s95()

# All Checkbuttons Off

def reset():
 
    global b0_7var, speed0, speed1, speed2, speed3, speed4, speed5, speed6, speed7, speed8, speed9, speed10, speed11, speed12, speed13, speed14, speed15, speed16, \
           speed17, speed18, speed19, speed20, speed21, speed22, speed23, speed24, speed25, speed26, speed27, speed28, speed29, speed30, speed31, speed32, speed33, \
           speed34, speed35, speed36, speed37, speed38, speed39, speed40, speed41, speed42, speed43, speed44, speed45, speed46, speed47, speed48, speed49, speed50, \
           speed51, speed52, speed53, speed54, speed55, speed56, speed57, speed58, speed59, speed60, speed61, speed62, speed63, speed64, speed65, speed66, speed67, \
           speed68, speed69, speed70, speed71, speed72, speed73, speed74, speed75, speed76, speed77, speed78, speed79, speed80, speed81, speed82, speed83, speed84, \
           speed85, speed86, speed87, speed88, speed89, speed90, speed91, speed92, speed93, speed94, speed95, repeat, loop
    
    if b0_0var.get()>0:
        b0_0.invoke()
    if b0_1var.get()>0:
        b0_1.invoke()
    if b0_2var.get()>0:
        b0_2.invoke()
    if b0_3var.get()>0:
        b0_3.invoke()
    if b0_4var.get()>0:
        b0_4.invoke()
    if b0_5var.get()>0:
        b0_5.invoke()
    if b0_6var.get()>0:
        b0_6.invoke()
    if b0_7var.get()>0:
        b0_7.invoke()

    if b1_0var.get()>0:
        b1_0.invoke()
    if b1_1var.get()>0:
        b1_1.invoke()
    if b1_2var.get()>0:
        b1_2.invoke()
    if b1_3var.get()>0:
        b1_3.invoke()
    if b1_4var.get()>0:
        b1_4.invoke()
    if b1_5var.get()>0:
        b1_5.invoke()
    if b1_7var.get()>0:
        b1_7.invoke()

    if b2_0var.get()>0:
        b2_0.invoke()
    if b2_1var.get()>0:
        b2_1.invoke()
    if b2_2var.get()>0:
        b2_2.invoke()
    if b2_3var.get()>0:
        b2_3.invoke()
    if b2_4var.get()>0:
        b2_4.invoke()
    if b2_5var.get()>0:
        b2_5.invoke()
    if b2_7var.get()>0:
        b2_7.invoke()

    if b3_0var.get()>0:
        b3_0.invoke()
    if b3_1var.get()>0:
        b3_1.invoke()
    if b3_2var.get()>0:
        b3_2.invoke()
    if b3_3var.get()>0:
        b3_3.invoke()
    if b3_4var.get()>0:
        b3_4.invoke()
    if b3_5var.get()>0:
        b3_5.invoke()
    if b3_7var.get()>0:
        b3_7.invoke()

    if b4_0var.get()>0:
        b4_0.invoke()
    if b4_1var.get()>0:
        b4_1.invoke()
    if b4_2var.get()>0:
        b4_2.invoke()
    if b4_3var.get()>0:
        b4_3.invoke()
    if b4_4var.get()>0:
        b4_4.invoke()
    if b4_5var.get()>0:
        b4_5.invoke()
    if b4_7var.get()>0:
        b4_7.invoke()

    if b5_0var.get()>0:
        b5_0.invoke()
    if b5_1var.get()>0:
        b5_1.invoke()
    if b5_2var.get()>0:
        b5_2.invoke()
    if b5_3var.get()>0:
        b5_3.invoke()
    if b5_4var.get()>0:
        b5_4.invoke()
    if b5_5var.get()>0:
        b5_5.invoke()
    if b5_7var.get()>0:
        b5_7.invoke()

    if b6_0var.get()>0:
        b6_0.invoke()
    if b6_1var.get()>0:
        b6_1.invoke()
    if b6_2var.get()>0:
        b6_2.invoke()
    if b6_3var.get()>0:
        b6_3.invoke()
    if b6_4var.get()>0:
        b6_4.invoke()
    if b6_5var.get()>0:
        b6_5.invoke()
    if b6_7var.get()>0:
        b6_7.invoke()

    if b7_0var.get()>0:
        b7_0.invoke()
    if b7_1var.get()>0:
        b7_1.invoke()
    if b7_2var.get()>0:
        b7_2.invoke()
    if b7_3var.get()>0:
        b7_3.invoke()
    if b7_4var.get()>0:
        b7_4.invoke()
    if b7_5var.get()>0:
        b7_5.invoke()
    if b7_7var.get()>0:
        b7_7.invoke()

    if b8_0var.get()>0:
        b8_0.invoke()
    if b8_1var.get()>0:
        b8_1.invoke()
    if b8_2var.get()>0:
        b8_2.invoke()
    if b8_3var.get()>0:
        b8_3.invoke()
    if b8_4var.get()>0:
        b8_4.invoke()
    if b8_5var.get()>0:
        b8_5.invoke()
    if b8_7var.get()>0:
        b8_7.invoke()

    if b9_0var.get()>0:
        b9_0.invoke()
    if b9_1var.get()>0:
        b9_1.invoke()
    if b9_2var.get()>0:
        b9_2.invoke()
    if b9_3var.get()>0:
        b9_3.invoke()
    if b9_4var.get()>0:
        b9_4.invoke()
    if b9_5var.get()>0:
        b9_5.invoke()
    if b9_7var.get()>0:
        b9_7.invoke()

    if b10_0var.get()>0:
        b10_0.invoke()
    if b10_1var.get()>0:
        b10_1.invoke()
    if b10_2var.get()>0:
        b10_2.invoke()
    if b10_3var.get()>0:
        b10_3.invoke()
    if b10_4var.get()>0:
        b10_4.invoke()
    if b10_5var.get()>0:
        b10_5.invoke()
    if b10_7var.get()>0:
        b10_7.invoke()

    if b11_0var.get()>0:
        b11_0.invoke()
    if b11_1var.get()>0:
        b11_1.invoke()
    if b11_2var.get()>0:
        b11_2.invoke()
    if b11_3var.get()>0:
        b11_3.invoke()
    if b11_4var.get()>0:
        b11_4.invoke()
    if b11_5var.get()>0:
        b11_5.invoke()
    if b11_7var.get()>0:
        b11_7.invoke()

    if b12_0var.get()>0:
        b12_0.invoke()
    if b12_1var.get()>0:
        b12_1.invoke()
    if b12_2var.get()>0:
        b12_2.invoke()
    if b12_3var.get()>0:
        b12_3.invoke()
    if b12_4var.get()>0:
        b12_4.invoke()
    if b12_5var.get()>0:
        b12_5.invoke()
    if b12_7var.get()>0:
        b12_7.invoke()

    if b13_0var.get()>0:
        b13_0.invoke()
    if b13_1var.get()>0:
        b13_1.invoke()
    if b13_2var.get()>0:
        b13_2.invoke()
    if b13_3var.get()>0:
        b13_3.invoke()
    if b13_4var.get()>0:
        b13_4.invoke()
    if b13_5var.get()>0:
        b13_5.invoke()
    if b13_7var.get()>0:
        b13_7.invoke()

    if b14_0var.get()>0:
        b14_0.invoke()
    if b14_1var.get()>0:
        b14_1.invoke()
    if b14_2var.get()>0:
        b14_2.invoke()
    if b14_3var.get()>0:
        b14_3.invoke()
    if b14_4var.get()>0:
        b14_4.invoke()
    if b14_5var.get()>0:
        b14_5.invoke()
    if b14_7var.get()>0:
        b14_7.invoke()

    if b15_0var.get()>0:
        b15_0.invoke()
    if b15_1var.get()>0:
        b15_1.invoke()
    if b15_2var.get()>0:
        b15_2.invoke()
    if b15_3var.get()>0:
        b15_3.invoke()
    if b15_4var.get()>0:
        b15_4.invoke()
    if b15_5var.get()>0:
        b15_5.invoke()
    if b15_7var.get()>0:
        b15_7.invoke()

    if b16_0var.get()>0:
        b16_0.invoke()
    if b16_1var.get()>0:
        b16_1.invoke()
    if b16_2var.get()>0:
        b16_2.invoke()
    if b16_3var.get()>0:
        b16_3.invoke()
    if b16_4var.get()>0:
        b16_4.invoke()
    if b16_5var.get()>0:
        b16_5.invoke()
    if b16_7var.get()>0:
        b16_7.invoke()

    if b17_0var.get()>0:
        b17_0.invoke()
    if b17_1var.get()>0:
        b17_1.invoke()
    if b17_2var.get()>0:
        b17_2.invoke()
    if b17_3var.get()>0:
        b17_3.invoke()
    if b17_4var.get()>0:
        b17_4.invoke()
    if b17_5var.get()>0:
        b17_5.invoke()
    if b17_7var.get()>0:
        b17_7.invoke()

    if b18_0var.get()>0:
        b18_0.invoke()
    if b18_1var.get()>0:
        b18_1.invoke()
    if b18_2var.get()>0:
        b18_2.invoke()
    if b18_3var.get()>0:
        b18_3.invoke()
    if b18_4var.get()>0:
        b18_4.invoke()
    if b18_5var.get()>0:
        b18_5.invoke()
    if b18_7var.get()>0:
        b18_7.invoke()

    if b19_0var.get()>0:
        b19_0.invoke()
    if b19_1var.get()>0:
        b19_1.invoke()
    if b19_2var.get()>0:
        b19_2.invoke()
    if b19_3var.get()>0:
        b19_3.invoke()
    if b19_4var.get()>0:
        b19_4.invoke()
    if b19_5var.get()>0:
        b19_5.invoke()
    if b19_7var.get()>0:
        b19_7.invoke()

    if b20_0var.get()>0:
        b20_0.invoke()
    if b20_1var.get()>0:
        b20_1.invoke()
    if b20_2var.get()>0:
        b20_2.invoke()
    if b20_3var.get()>0:
        b20_3.invoke()
    if b20_4var.get()>0:
        b20_4.invoke()
    if b20_5var.get()>0:
        b20_5.invoke()
    if b20_7var.get()>0:
        b20_7.invoke()

    if b21_0var.get()>0:
        b21_0.invoke()
    if b21_1var.get()>0:
        b21_1.invoke()
    if b21_2var.get()>0:
        b21_2.invoke()
    if b21_3var.get()>0:
        b21_3.invoke()
    if b21_4var.get()>0:
        b21_4.invoke()
    if b21_5var.get()>0:
        b21_5.invoke()
    if b21_7var.get()>0:
        b21_7.invoke()

    if b22_0var.get()>0:
        b22_0.invoke()
    if b22_1var.get()>0:
        b22_1.invoke()
    if b22_2var.get()>0:
        b22_2.invoke()
    if b22_3var.get()>0:
        b22_3.invoke()
    if b22_4var.get()>0:
        b22_4.invoke()
    if b22_5var.get()>0:
        b22_5.invoke()
    if b22_7var.get()>0:
        b22_7.invoke()

    if b23_0var.get()>0:
        b23_0.invoke()
    if b23_1var.get()>0:
        b23_1.invoke()
    if b23_2var.get()>0:
        b23_2.invoke()
    if b23_3var.get()>0:
        b23_3.invoke()
    if b23_4var.get()>0:
        b23_4.invoke()
    if b23_5var.get()>0:
        b23_5.invoke()
    if b23_7var.get()>0:
        b23_7.invoke()

    if b24_0var.get()>0:
        b24_0.invoke()
    if b24_1var.get()>0:
        b24_1.invoke()
    if b24_2var.get()>0:
        b24_2.invoke()
    if b24_3var.get()>0:
        b24_3.invoke()
    if b24_4var.get()>0:
        b24_4.invoke()
    if b24_5var.get()>0:
        b24_5.invoke()
    if b24_7var.get()>0:
        b24_7.invoke()

    if b25_0var.get()>0:
        b25_0.invoke()
    if b25_1var.get()>0:
        b25_1.invoke()
    if b25_2var.get()>0:
        b25_2.invoke()
    if b25_3var.get()>0:
        b25_3.invoke()
    if b25_4var.get()>0:
        b25_4.invoke()
    if b25_5var.get()>0:
        b25_5.invoke()
    if b25_7var.get()>0:
        b25_7.invoke()

    if b26_0var.get()>0:
        b26_0.invoke()
    if b26_1var.get()>0:
        b26_1.invoke()
    if b26_2var.get()>0:
        b26_2.invoke()
    if b26_3var.get()>0:
        b26_3.invoke()
    if b26_4var.get()>0:
        b26_4.invoke()
    if b26_5var.get()>0:
        b26_5.invoke()
    if b26_7var.get()>0:
        b26_7.invoke()

    if b27_0var.get()>0:
        b27_0.invoke()
    if b27_1var.get()>0:
        b27_1.invoke()
    if b27_2var.get()>0:
        b27_2.invoke()
    if b27_3var.get()>0:
        b27_3.invoke()
    if b27_4var.get()>0:
        b27_4.invoke()
    if b27_5var.get()>0:
        b27_5.invoke()
    if b27_7var.get()>0:
        b27_7.invoke()

    if b28_0var.get()>0:
        b28_0.invoke()
    if b28_1var.get()>0:
        b28_1.invoke()
    if b28_2var.get()>0:
        b28_2.invoke()
    if b28_3var.get()>0:
        b28_3.invoke()
    if b28_4var.get()>0:
        b28_4.invoke()
    if b28_5var.get()>0:
        b28_5.invoke()
    if b28_7var.get()>0:
        b28_7.invoke()

    if b29_0var.get()>0:
        b29_0.invoke()
    if b29_1var.get()>0:
        b29_1.invoke()
    if b29_2var.get()>0:
        b29_2.invoke()
    if b29_3var.get()>0:
        b29_3.invoke()
    if b29_4var.get()>0:
        b29_4.invoke()
    if b29_5var.get()>0:
        b29_5.invoke()
    if b29_7var.get()>0:
        b29_7.invoke()

    if b30_0var.get()>0:
        b30_0.invoke()
    if b30_1var.get()>0:
        b30_1.invoke()
    if b30_2var.get()>0:
        b30_2.invoke()
    if b30_3var.get()>0:
        b30_3.invoke()
    if b30_4var.get()>0:
        b30_4.invoke()
    if b30_5var.get()>0:
        b30_5.invoke()
    if b30_7var.get()>0:
        b30_7.invoke()

    if b31_0var.get()>0:
        b31_0.invoke()
    if b31_1var.get()>0:
        b31_1.invoke()
    if b31_2var.get()>0:
        b31_2.invoke()
    if b31_3var.get()>0:
        b31_3.invoke()
    if b31_4var.get()>0:
        b31_4.invoke()
    if b31_5var.get()>0:
        b31_5.invoke()
    if b31_7var.get()>0:
        b31_7.invoke()

    if b32_0var.get()>0:
        b32_0.invoke()
    if b32_1var.get()>0:
        b32_1.invoke()
    if b32_2var.get()>0:
        b32_2.invoke()
    if b32_3var.get()>0:
        b32_3.invoke()
    if b32_4var.get()>0:
        b32_4.invoke()
    if b32_5var.get()>0:
        b32_5.invoke()
    if b32_7var.get()>0:
        b32_7.invoke()

    if b33_0var.get()>0:
        b33_0.invoke()
    if b33_1var.get()>0:
        b33_1.invoke()
    if b33_2var.get()>0:
        b33_2.invoke()
    if b33_3var.get()>0:
        b33_3.invoke()
    if b33_4var.get()>0:
        b33_4.invoke()
    if b33_5var.get()>0:
        b33_5.invoke()
    if b33_7var.get()>0:
        b33_7.invoke()

    if b34_0var.get()>0:
        b34_0.invoke()
    if b34_1var.get()>0:
        b34_1.invoke()
    if b34_2var.get()>0:
        b34_2.invoke()
    if b34_3var.get()>0:
        b34_3.invoke()
    if b34_4var.get()>0:
        b34_4.invoke()
    if b34_5var.get()>0:
        b34_5.invoke()
    if b34_7var.get()>0:
        b34_7.invoke()

    if b35_0var.get()>0:
        b35_0.invoke()
    if b35_1var.get()>0:
        b35_1.invoke()
    if b35_2var.get()>0:
        b35_2.invoke()
    if b35_3var.get()>0:
        b35_3.invoke()
    if b35_4var.get()>0:
        b35_4.invoke()
    if b35_5var.get()>0:
        b35_5.invoke()
    if b35_7var.get()>0:
        b35_7.invoke()

    if b36_0var.get()>0:
        b36_0.invoke()
    if b36_1var.get()>0:
        b36_1.invoke()
    if b36_2var.get()>0:
        b36_2.invoke()
    if b36_3var.get()>0:
        b36_3.invoke()
    if b36_4var.get()>0:
        b36_4.invoke()
    if b36_5var.get()>0:
        b36_5.invoke()
    if b36_7var.get()>0:
        b36_7.invoke()

    if b37_0var.get()>0:
        b37_0.invoke()
    if b37_1var.get()>0:
        b37_1.invoke()
    if b37_2var.get()>0:
        b37_2.invoke()
    if b37_3var.get()>0:
        b37_3.invoke()
    if b37_4var.get()>0:
        b37_4.invoke()
    if b37_5var.get()>0:
        b37_5.invoke()
    if b37_7var.get()>0:
        b37_7.invoke()

    if b38_0var.get()>0:
        b38_0.invoke()
    if b38_1var.get()>0:
        b38_1.invoke()
    if b38_2var.get()>0:
        b38_2.invoke()
    if b38_3var.get()>0:
        b38_3.invoke()
    if b38_4var.get()>0:
        b38_4.invoke()
    if b38_5var.get()>0:
        b38_5.invoke()
    if b38_7var.get()>0:
        b38_7.invoke()

    if b39_0var.get()>0:
        b39_0.invoke()
    if b39_1var.get()>0:
        b39_1.invoke()
    if b39_2var.get()>0:
        b39_2.invoke()
    if b39_3var.get()>0:
        b39_3.invoke()
    if b39_4var.get()>0:
        b39_4.invoke()
    if b39_5var.get()>0:
        b39_5.invoke()
    if b39_7var.get()>0:
        b39_7.invoke()

    if b40_0var.get()>0:
        b40_0.invoke()
    if b40_1var.get()>0:
        b40_1.invoke()
    if b40_2var.get()>0:
        b40_2.invoke()
    if b40_3var.get()>0:
        b40_3.invoke()
    if b40_4var.get()>0:
        b40_4.invoke()
    if b40_5var.get()>0:
        b40_5.invoke()
    if b40_7var.get()>0:
        b40_7.invoke()

    if b41_0var.get()>0:
        b41_0.invoke()
    if b41_1var.get()>0:
        b41_1.invoke()
    if b41_2var.get()>0:
        b41_2.invoke()
    if b41_3var.get()>0:
        b41_3.invoke()
    if b41_4var.get()>0:
        b41_4.invoke()
    if b41_5var.get()>0:
        b41_5.invoke()
    if b41_7var.get()>0:
        b41_7.invoke()

    if b42_0var.get()>0:
        b42_0.invoke()
    if b42_1var.get()>0:
        b42_1.invoke()
    if b42_2var.get()>0:
        b42_2.invoke()
    if b42_3var.get()>0:
        b42_3.invoke()
    if b42_4var.get()>0:
        b42_4.invoke()
    if b42_5var.get()>0:
        b42_5.invoke()
    if b42_7var.get()>0:
        b42_7.invoke()

    if b43_0var.get()>0:
        b43_0.invoke()
    if b43_1var.get()>0:
        b43_1.invoke()
    if b43_2var.get()>0:
        b43_2.invoke()
    if b43_3var.get()>0:
        b43_3.invoke()
    if b43_4var.get()>0:
        b43_4.invoke()
    if b43_5var.get()>0:
        b43_5.invoke()
    if b43_7var.get()>0:
        b43_7.invoke()

    if b44_0var.get()>0:
        b44_0.invoke()
    if b44_1var.get()>0:
        b44_1.invoke()
    if b44_2var.get()>0:
        b44_2.invoke()
    if b44_3var.get()>0:
        b44_3.invoke()
    if b44_4var.get()>0:
        b44_4.invoke()
    if b44_5var.get()>0:
        b44_5.invoke()
    if b44_7var.get()>0:
        b44_7.invoke()

    if b45_0var.get()>0:
        b45_0.invoke()
    if b45_1var.get()>0:
        b45_1.invoke()
    if b45_2var.get()>0:
        b45_2.invoke()
    if b45_3var.get()>0:
        b45_3.invoke()
    if b45_4var.get()>0:
        b45_4.invoke()
    if b45_5var.get()>0:
        b45_5.invoke()
    if b45_7var.get()>0:
        b45_7.invoke()

    if b46_0var.get()>0:
        b46_0.invoke()
    if b46_1var.get()>0:
        b46_1.invoke()
    if b46_2var.get()>0:
        b46_2.invoke()
    if b46_3var.get()>0:
        b46_3.invoke()
    if b46_4var.get()>0:
        b46_4.invoke()
    if b46_5var.get()>0:
        b46_5.invoke()
    if b46_7var.get()>0:
        b46_7.invoke()

    if b47_0var.get()>0:
        b47_0.invoke()
    if b47_1var.get()>0:
        b47_1.invoke()
    if b47_2var.get()>0:
        b47_2.invoke()
    if b47_3var.get()>0:
        b47_3.invoke()
    if b47_4var.get()>0:
        b47_4.invoke()
    if b47_5var.get()>0:
        b47_5.invoke()
    if b47_7var.get()>0:
        b47_7.invoke()

    if b48_0var.get()>0:
        b48_0.invoke()
    if b48_1var.get()>0:
        b48_1.invoke()
    if b48_2var.get()>0:
        b48_2.invoke()
    if b48_3var.get()>0:
        b48_3.invoke()
    if b48_4var.get()>0:
        b48_4.invoke()
    if b48_5var.get()>0:
        b48_5.invoke()
    if b48_7var.get()>0:
        b48_7.invoke()

    if b49_0var.get()>0:
        b49_0.invoke()
    if b49_1var.get()>0:
        b49_1.invoke()
    if b49_2var.get()>0:
        b49_2.invoke()
    if b49_3var.get()>0:
        b49_3.invoke()
    if b49_4var.get()>0:
        b49_4.invoke()
    if b49_5var.get()>0:
        b49_5.invoke()
    if b49_7var.get()>0:
        b49_7.invoke()

    if b50_0var.get()>0:
        b50_0.invoke()
    if b50_1var.get()>0:
        b50_1.invoke()
    if b50_2var.get()>0:
        b50_2.invoke()
    if b50_3var.get()>0:
        b50_3.invoke()
    if b50_4var.get()>0:
        b50_4.invoke()
    if b50_5var.get()>0:
        b50_5.invoke()
    if b50_7var.get()>0:
        b50_7.invoke()

    if b51_0var.get()>0:
        b51_0.invoke()
    if b51_1var.get()>0:
        b51_1.invoke()
    if b51_2var.get()>0:
        b51_2.invoke()
    if b51_3var.get()>0:
        b51_3.invoke()
    if b51_4var.get()>0:
        b51_4.invoke()
    if b51_5var.get()>0:
        b51_5.invoke()
    if b51_7var.get()>0:
        b51_7.invoke()

    if b52_0var.get()>0:
        b52_0.invoke()
    if b52_1var.get()>0:
        b52_1.invoke()
    if b52_2var.get()>0:
        b52_2.invoke()
    if b52_3var.get()>0:
        b52_3.invoke()
    if b52_4var.get()>0:
        b52_4.invoke()
    if b52_5var.get()>0:
        b52_5.invoke()
    if b52_7var.get()>0:
        b52_7.invoke()

    if b53_0var.get()>0:
        b53_0.invoke()
    if b53_1var.get()>0:
        b53_1.invoke()
    if b53_2var.get()>0:
        b53_2.invoke()
    if b53_3var.get()>0:
        b53_3.invoke()
    if b53_4var.get()>0:
        b53_4.invoke()
    if b53_5var.get()>0:
        b53_5.invoke()
    if b53_7var.get()>0:
        b53_7.invoke()

    if b54_0var.get()>0:
        b54_0.invoke()
    if b54_1var.get()>0:
        b54_1.invoke()
    if b54_2var.get()>0:
        b54_2.invoke()
    if b54_3var.get()>0:
        b54_3.invoke()
    if b54_4var.get()>0:
        b54_4.invoke()
    if b54_5var.get()>0:
        b54_5.invoke()
    if b54_7var.get()>0:
        b54_7.invoke()

    if b55_0var.get()>0:
        b55_0.invoke()
    if b55_1var.get()>0:
        b55_1.invoke()
    if b55_2var.get()>0:
        b55_2.invoke()
    if b55_3var.get()>0:
        b55_3.invoke()
    if b55_4var.get()>0:
        b55_4.invoke()
    if b55_5var.get()>0:
        b55_5.invoke()
    if b55_7var.get()>0:
        b55_7.invoke()

    if b56_0var.get()>0:
        b56_0.invoke()
    if b56_1var.get()>0:
        b56_1.invoke()
    if b56_2var.get()>0:
        b56_2.invoke()
    if b56_3var.get()>0:
        b56_3.invoke()
    if b56_4var.get()>0:
        b56_4.invoke()
    if b56_5var.get()>0:
        b56_5.invoke()
    if b56_7var.get()>0:
        b56_7.invoke()

    if b57_0var.get()>0:
        b57_0.invoke()
    if b57_1var.get()>0:
        b57_1.invoke()
    if b57_2var.get()>0:
        b57_2.invoke()
    if b57_3var.get()>0:
        b57_3.invoke()
    if b57_4var.get()>0:
        b57_4.invoke()
    if b57_5var.get()>0:
        b57_5.invoke()
    if b57_7var.get()>0:
        b57_7.invoke()

    if b58_0var.get()>0:
        b58_0.invoke()
    if b58_1var.get()>0:
        b58_1.invoke()
    if b58_2var.get()>0:
        b58_2.invoke()
    if b58_3var.get()>0:
        b58_3.invoke()
    if b58_4var.get()>0:
        b58_4.invoke()
    if b58_5var.get()>0:
        b58_5.invoke()
    if b58_7var.get()>0:
        b58_7.invoke()

    if b59_0var.get()>0:
        b59_0.invoke()
    if b59_1var.get()>0:
        b59_1.invoke()
    if b59_2var.get()>0:
        b59_2.invoke()
    if b59_3var.get()>0:
        b59_3.invoke()
    if b59_4var.get()>0:
        b59_4.invoke()
    if b59_5var.get()>0:
        b59_5.invoke()
    if b59_7var.get()>0:
        b59_7.invoke()

    if b60_0var.get()>0:
        b60_0.invoke()
    if b60_1var.get()>0:
        b60_1.invoke()
    if b60_2var.get()>0:
        b60_2.invoke()
    if b60_3var.get()>0:
        b60_3.invoke()
    if b60_4var.get()>0:
        b60_4.invoke()
    if b60_5var.get()>0:
        b60_5.invoke()
    if b60_7var.get()>0:
        b60_7.invoke()

    if b61_0var.get()>0:
        b61_0.invoke()
    if b61_1var.get()>0:
        b61_1.invoke()
    if b61_2var.get()>0:
        b61_2.invoke()
    if b61_3var.get()>0:
        b61_3.invoke()
    if b61_4var.get()>0:
        b61_4.invoke()
    if b61_5var.get()>0:
        b61_5.invoke()
    if b61_7var.get()>0:
        b61_7.invoke()

    if b62_0var.get()>0:
        b62_0.invoke()
    if b62_1var.get()>0:
        b62_1.invoke()
    if b62_2var.get()>0:
        b62_2.invoke()
    if b62_3var.get()>0:
        b62_3.invoke()
    if b62_4var.get()>0:
        b62_4.invoke()
    if b62_5var.get()>0:
        b62_5.invoke()
    if b62_7var.get()>0:
        b62_7.invoke()

    if b63_0var.get()>0:
        b63_0.invoke()
    if b63_1var.get()>0:
        b63_1.invoke()
    if b63_2var.get()>0:
        b63_2.invoke()
    if b63_3var.get()>0:
        b63_3.invoke()
    if b63_4var.get()>0:
        b63_4.invoke()
    if b63_5var.get()>0:
        b63_5.invoke()
    if b63_7var.get()>0:
        b63_7.invoke()

    if b64_0var.get()>0:
        b64_0.invoke()
    if b64_1var.get()>0:
        b64_1.invoke()
    if b64_2var.get()>0:
        b64_2.invoke()
    if b64_3var.get()>0:
        b64_3.invoke()
    if b64_4var.get()>0:
        b64_4.invoke()
    if b64_5var.get()>0:
        b64_5.invoke()
    if b64_7var.get()>0:
        b64_7.invoke()

    if b65_0var.get()>0:
        b65_0.invoke()
    if b65_1var.get()>0:
        b65_1.invoke()
    if b65_2var.get()>0:
        b65_2.invoke()
    if b65_3var.get()>0:
        b65_3.invoke()
    if b65_4var.get()>0:
        b65_4.invoke()
    if b65_5var.get()>0:
        b65_5.invoke()
    if b65_7var.get()>0:
        b65_7.invoke()

    if b66_0var.get()>0:
        b66_0.invoke()
    if b66_1var.get()>0:
        b66_1.invoke()
    if b66_2var.get()>0:
        b66_2.invoke()
    if b66_3var.get()>0:
        b66_3.invoke()
    if b66_4var.get()>0:
        b66_4.invoke()
    if b66_5var.get()>0:
        b66_5.invoke()
    if b66_7var.get()>0:
        b66_7.invoke()

    if b67_0var.get()>0:
        b67_0.invoke()
    if b67_1var.get()>0:
        b67_1.invoke()
    if b67_2var.get()>0:
        b67_2.invoke()
    if b67_3var.get()>0:
        b67_3.invoke()
    if b67_4var.get()>0:
        b67_4.invoke()
    if b67_5var.get()>0:
        b67_5.invoke()
    if b67_7var.get()>0:
        b67_7.invoke()

    if b68_0var.get()>0:
        b68_0.invoke()
    if b68_1var.get()>0:
        b68_1.invoke()
    if b68_2var.get()>0:
        b68_2.invoke()
    if b68_3var.get()>0:
        b68_3.invoke()
    if b68_4var.get()>0:
        b68_4.invoke()
    if b68_5var.get()>0:
        b68_5.invoke()
    if b68_7var.get()>0:
        b68_7.invoke()

    if b69_0var.get()>0:
        b69_0.invoke()
    if b69_1var.get()>0:
        b69_1.invoke()
    if b69_2var.get()>0:
        b69_2.invoke()
    if b69_3var.get()>0:
        b69_3.invoke()
    if b69_4var.get()>0:
        b69_4.invoke()
    if b69_5var.get()>0:
        b69_5.invoke()
    if b69_7var.get()>0:
        b69_7.invoke()

    if b70_0var.get()>0:
        b70_0.invoke()
    if b70_1var.get()>0:
        b70_1.invoke()
    if b70_2var.get()>0:
        b70_2.invoke()
    if b70_3var.get()>0:
        b70_3.invoke()
    if b70_4var.get()>0:
        b70_4.invoke()
    if b70_5var.get()>0:
        b70_5.invoke()
    if b70_7var.get()>0:
        b70_7.invoke()

    if b71_0var.get()>0:
        b71_0.invoke()
    if b71_1var.get()>0:
        b71_1.invoke()
    if b71_2var.get()>0:
        b71_2.invoke()
    if b71_3var.get()>0:
        b71_3.invoke()
    if b71_4var.get()>0:
        b71_4.invoke()
    if b71_5var.get()>0:
        b71_5.invoke()
    if b71_7var.get()>0:
        b71_7.invoke()

    if b72_0var.get()>0:
        b72_0.invoke()
    if b72_1var.get()>0:
        b72_1.invoke()
    if b72_2var.get()>0:
        b72_2.invoke()
    if b72_3var.get()>0:
        b72_3.invoke()
    if b72_4var.get()>0:
        b72_4.invoke()
    if b72_5var.get()>0:
        b72_5.invoke()
    if b72_7var.get()>0:
        b72_7.invoke()

    if b73_0var.get()>0:
        b73_0.invoke()
    if b73_1var.get()>0:
        b73_1.invoke()
    if b73_2var.get()>0:
        b73_2.invoke()
    if b73_3var.get()>0:
        b73_3.invoke()
    if b73_4var.get()>0:
        b73_4.invoke()
    if b73_5var.get()>0:
        b73_5.invoke()
    if b73_7var.get()>0:
        b73_7.invoke()

    if b74_0var.get()>0:
        b74_0.invoke()
    if b74_1var.get()>0:
        b74_1.invoke()
    if b74_2var.get()>0:
        b74_2.invoke()
    if b74_3var.get()>0:
        b74_3.invoke()
    if b74_4var.get()>0:
        b74_4.invoke()
    if b74_5var.get()>0:
        b74_5.invoke()
    if b74_7var.get()>0:
        b74_7.invoke()

    if b75_0var.get()>0:
        b75_0.invoke()
    if b75_1var.get()>0:
        b75_1.invoke()
    if b75_2var.get()>0:
        b75_2.invoke()
    if b75_3var.get()>0:
        b75_3.invoke()
    if b75_4var.get()>0:
        b75_4.invoke()
    if b75_5var.get()>0:
        b75_5.invoke()
    if b75_7var.get()>0:
        b75_7.invoke()

    if b76_0var.get()>0:
        b76_0.invoke()
    if b76_1var.get()>0:
        b76_1.invoke()
    if b76_2var.get()>0:
        b76_2.invoke()
    if b76_3var.get()>0:
        b76_3.invoke()
    if b76_4var.get()>0:
        b76_4.invoke()
    if b76_5var.get()>0:
        b76_5.invoke()
    if b76_7var.get()>0:
        b76_7.invoke()

    if b77_0var.get()>0:
        b77_0.invoke()
    if b77_1var.get()>0:
        b77_1.invoke()
    if b77_2var.get()>0:
        b77_2.invoke()
    if b77_3var.get()>0:
        b77_3.invoke()
    if b77_4var.get()>0:
        b77_4.invoke()
    if b77_5var.get()>0:
        b77_5.invoke()
    if b77_7var.get()>0:
        b77_7.invoke()

    if b78_0var.get()>0:
        b78_0.invoke()
    if b78_1var.get()>0:
        b78_1.invoke()
    if b78_2var.get()>0:
        b78_2.invoke()
    if b78_3var.get()>0:
        b78_3.invoke()
    if b78_4var.get()>0:
        b78_4.invoke()
    if b78_5var.get()>0:
        b78_5.invoke()
    if b78_7var.get()>0:
        b78_7.invoke()

    if b79_0var.get()>0:
        b79_0.invoke()
    if b79_1var.get()>0:
        b79_1.invoke()
    if b79_2var.get()>0:
        b79_2.invoke()
    if b79_3var.get()>0:
        b79_3.invoke()
    if b79_4var.get()>0:
        b79_4.invoke()
    if b79_5var.get()>0:
        b79_5.invoke()
    if b79_7var.get()>0:
        b79_7.invoke()

    if b80_0var.get()>0:
        b80_0.invoke()
    if b80_1var.get()>0:
        b80_1.invoke()
    if b80_2var.get()>0:
        b80_2.invoke()
    if b80_3var.get()>0:
        b80_3.invoke()
    if b80_4var.get()>0:
        b80_4.invoke()
    if b80_5var.get()>0:
        b80_5.invoke()
    if b80_7var.get()>0:
        b80_7.invoke()

    if b81_0var.get()>0:
        b81_0.invoke()
    if b81_1var.get()>0:
        b81_1.invoke()
    if b81_2var.get()>0:
        b81_2.invoke()
    if b81_3var.get()>0:
        b81_3.invoke()
    if b81_4var.get()>0:
        b81_4.invoke()
    if b81_5var.get()>0:
        b81_5.invoke()
    if b81_7var.get()>0:
        b81_7.invoke()

    if b82_0var.get()>0:
        b82_0.invoke()
    if b82_1var.get()>0:
        b82_1.invoke()
    if b82_2var.get()>0:
        b82_2.invoke()
    if b82_3var.get()>0:
        b82_3.invoke()
    if b82_4var.get()>0:
        b82_4.invoke()
    if b82_5var.get()>0:
        b82_5.invoke()
    if b82_7var.get()>0:
        b82_7.invoke()

    if b83_0var.get()>0:
        b83_0.invoke()
    if b83_1var.get()>0:
        b83_1.invoke()
    if b83_2var.get()>0:
        b83_2.invoke()
    if b83_3var.get()>0:
        b83_3.invoke()
    if b83_4var.get()>0:
        b83_4.invoke()
    if b83_5var.get()>0:
        b83_5.invoke()
    if b83_7var.get()>0:
        b83_7.invoke()

    if b84_0var.get()>0:
        b84_0.invoke()
    if b84_1var.get()>0:
        b84_1.invoke()
    if b84_2var.get()>0:
        b84_2.invoke()
    if b84_3var.get()>0:
        b84_3.invoke()
    if b84_4var.get()>0:
        b84_4.invoke()
    if b84_5var.get()>0:
        b84_5.invoke()
    if b84_7var.get()>0:
        b84_7.invoke()

    if b85_0var.get()>0:
        b85_0.invoke()
    if b85_1var.get()>0:
        b85_1.invoke()
    if b85_2var.get()>0:
        b85_2.invoke()
    if b85_3var.get()>0:
        b85_3.invoke()
    if b85_4var.get()>0:
        b85_4.invoke()
    if b85_5var.get()>0:
        b85_5.invoke()
    if b85_7var.get()>0:
        b85_7.invoke()

    if b86_0var.get()>0:
        b86_0.invoke()
    if b86_1var.get()>0:
        b86_1.invoke()
    if b86_2var.get()>0:
        b86_2.invoke()
    if b86_3var.get()>0:
        b86_3.invoke()
    if b86_4var.get()>0:
        b86_4.invoke()
    if b86_5var.get()>0:
        b86_5.invoke()
    if b86_7var.get()>0:
        b86_7.invoke()

    if b87_0var.get()>0:
        b87_0.invoke()
    if b87_1var.get()>0:
        b87_1.invoke()
    if b87_2var.get()>0:
        b87_2.invoke()
    if b87_3var.get()>0:
        b87_3.invoke()
    if b87_4var.get()>0:
        b87_4.invoke()
    if b87_5var.get()>0:
        b87_5.invoke()
    if b87_7var.get()>0:
        b87_7.invoke()

    if b88_0var.get()>0:
        b88_0.invoke()
    if b88_1var.get()>0:
        b88_1.invoke()
    if b88_2var.get()>0:
        b88_2.invoke()
    if b88_3var.get()>0:
        b88_3.invoke()
    if b88_4var.get()>0:
        b88_4.invoke()
    if b88_5var.get()>0:
        b88_5.invoke()
    if b88_7var.get()>0:
        b88_7.invoke()

    if b89_0var.get()>0:
        b89_0.invoke()
    if b89_1var.get()>0:
        b89_1.invoke()
    if b89_2var.get()>0:
        b89_2.invoke()
    if b89_3var.get()>0:
        b89_3.invoke()
    if b89_4var.get()>0:
        b89_4.invoke()
    if b89_5var.get()>0:
        b89_5.invoke()
    if b89_7var.get()>0:
        b89_7.invoke()

    if b90_0var.get()>0:
        b90_0.invoke()
    if b90_1var.get()>0:
        b90_1.invoke()
    if b90_2var.get()>0:
        b90_2.invoke()
    if b90_3var.get()>0:
        b90_3.invoke()
    if b90_4var.get()>0:
        b90_4.invoke()
    if b90_5var.get()>0:
        b90_5.invoke()
    if b90_7var.get()>0:
        b90_7.invoke()

    if b91_0var.get()>0:
        b91_0.invoke()
    if b91_1var.get()>0:
        b91_1.invoke()
    if b91_2var.get()>0:
        b91_2.invoke()
    if b91_3var.get()>0:
        b91_3.invoke()
    if b91_4var.get()>0:
        b91_4.invoke()
    if b91_5var.get()>0:
        b91_5.invoke()
    if b91_7var.get()>0:
        b91_7.invoke()

    if b92_0var.get()>0:
        b92_0.invoke()
    if b92_1var.get()>0:
        b92_1.invoke()
    if b92_2var.get()>0:
        b92_2.invoke()
    if b92_3var.get()>0:
        b92_3.invoke()
    if b92_4var.get()>0:
        b92_4.invoke()
    if b92_5var.get()>0:
        b92_5.invoke()
    if b92_7var.get()>0:
        b92_7.invoke()

    if b93_0var.get()>0:
        b93_0.invoke()
    if b93_1var.get()>0:
        b93_1.invoke()
    if b93_2var.get()>0:
        b93_2.invoke()
    if b93_3var.get()>0:
        b93_3.invoke()
    if b93_4var.get()>0:
        b93_4.invoke()
    if b93_5var.get()>0:
        b93_5.invoke()
    if b93_7var.get()>0:
        b93_7.invoke()

    if b94_0var.get()>0:
        b94_0.invoke()
    if b94_1var.get()>0:
        b94_1.invoke()
    if b94_2var.get()>0:
        b94_2.invoke()
    if b94_3var.get()>0:
        b94_3.invoke()
    if b94_4var.get()>0:
        b94_4.invoke()
    if b94_5var.get()>0:
        b94_5.invoke()
    if b94_7var.get()>0:
        b94_7.invoke()

    if b95_0var.get()>0:
        b95_0.invoke()
    if b95_1var.get()>0:
        b95_1.invoke()
    if b95_2var.get()>0:
        b95_2.invoke()
    if b95_3var.get()>0:
        b95_3.invoke()
    if b95_4var.get()>0:
        b95_4.invoke()
    if b95_5var.get()>0:
        b95_5.invoke()
    if b95_7var.get()>0:
        b95_7.invoke()

    if loop_var.get()>0:
        loop_0.invoke()


    speed0=0.5
    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())
    speed1=0.5
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())
    speed2=0.5
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())
    speed3=0.5
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())
    speed4=0.5
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())
    speed5=0.5
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())
    speed6=0.5
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())
    speed7=0.5
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())
    speed8=0.5
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())
    speed9=0.5
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())
    speed10=0.5
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())
    speed11=0.5
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())
    speed12=0.5
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())
    speed13=0.5
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())
    speed14=0.5
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())
    speed15=0.5
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())
    speed16=0.5
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())
    speed17=0.5
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())
    speed18=0.5
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())
    speed19=0.5
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())
    speed20=0.5
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())
    speed21=0.5
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())
    speed22=0.5
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())
    speed23=0.5
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())
    speed24=0.5
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())
    speed25=0.5
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())
    speed26=0.5
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())
    speed27=0.5
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())
    speed28=0.5
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())
    speed29=0.5
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())
    speed30=0.5
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())
    speed31=0.5
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())
    speed32=0.5
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())
    speed33=0.5
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())
    speed34=0.5
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())
    speed35=0.5
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())
    speed36=0.5
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())
    speed37=0.5
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())
    speed38=0.5
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())
    speed39=0.5
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())
    speed40=0.5
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())
    speed41=0.5
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())
    speed42=0.5
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())
    speed43=0.5
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())
    speed44=0.5
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())
    speed45=0.5
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())
    speed46=0.5
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())
    speed47=0.5
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())
    speed48=0.5
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())
    speed49=0.5
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())
    speed50=0.5
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())
    speed51=0.5
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())
    speed52=0.5
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())
    speed53=0.5
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())
    speed54=0.5
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())
    speed55=0.5
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())
    speed56=0.5
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())
    speed57=0.5
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())
    speed58=0.5
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())
    speed59=0.5
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())
    speed60=0.5
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())
    speed61=0.5
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())
    speed62=0.5
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())
    speed63=0.5
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())
    speed64=0.5
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())
    speed65=0.5
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())
    speed66=0.5
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())
    speed67=0.5
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())
    speed68=0.5
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())
    speed69=0.5
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())
    speed70=0.5
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())
    speed71=0.5
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())
    speed72=0.5
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())
    speed73=0.5
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())
    speed74=0.5
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())
    speed75=0.5
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())
    speed76=0.5
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())
    speed77=0.5
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())
    speed78=0.5
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())
    speed79=0.5
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())
    speed80=0.5
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())
    speed81=0.5
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())
    speed82=0.5
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())
    speed83=0.5
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())
    speed84=0.5
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())
    speed85=0.5
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())
    speed86=0.5
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())
    speed87=0.5
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())
    speed88=0.5
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())
    speed89=0.5
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())
    speed90=0.5
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())
    speed91=0.5
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())
    speed92=0.5
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())
    speed93=0.5
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())
    speed94=0.5
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())
    speed95=0.5
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())
    
    repeat=0.5
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())
    loop=1
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())





# Load data
def file_open():
    f = tkFileDialog.askopenfile(mode='r', defaultextension=".seq", filetypes=[('Sequence Files', '.seq'), ('Text Files', '.txt'), ('All Files', '.*')])
    if f is None:
        return
    if f != None:
        data = f.read()
        f.close()
        
    global speed0, speed1, speed2, speed3, speed4, speed5, speed6, speed7, speed8, speed9, speed10, speed11, speed12, speed13, speed14, speed15, speed16, \
           speed17, speed18, speed19, speed20, speed21, speed22, speed23, speed24, speed25, speed26, speed27, speed28, speed29, speed30, speed31, speed32, speed33, \
           speed34, speed35, speed36, speed37, speed38, speed39, speed40, speed41, speed42, speed43, speed44, speed45, speed46, speed47, speed48, speed49, speed50, \
           speed51, speed52, speed53, speed54, speed55, speed56, speed57, speed58, speed59, speed60, speed61, speed62, speed63, speed64, speed65, speed66, speed67, \
           speed68, speed69, speed70, speed71, speed72, speed73, speed74, speed75, speed76, speed77, speed78, speed79, speed80, speed81, speed82, speed83, speed84, \
           speed85, speed86, speed87, speed88, speed89, speed90, speed91, speed92, speed93, speed94, speed95, repeat, loop
    output = data.split()
    for bits in output:
        c0_0=output[0]
        c0_1=output[1]
        c0_2=output[2]
        c0_3=output[3]
        c0_4=output[4]
        c0_5=output[5]
        c0_6=output[6]
        c0_7=output[7]
        c1_0=output[8]
        c1_1=output[9]
        c1_2=output[10]
        c1_3=output[11]
        c1_4=output[12]
        c1_5=output[13]
        c1_7=output[14]
        c2_0=output[15]
        c2_1=output[16]
        c2_2=output[17]
        c2_3=output[18]
        c2_4=output[19]
        c2_5=output[20]
        c2_7=output[21]
        c3_0=output[22]
        c3_1=output[23]
        c3_2=output[24]
        c3_3=output[25]
        c3_4=output[26]
        c3_5=output[27]
        c3_7=output[28]
        c4_0=output[29]
        c4_1=output[30]
        c4_2=output[31]
        c4_3=output[32]
        c4_4=output[33]
        c4_5=output[34]
        c4_7=output[35]
        c5_0=output[36]
        c5_1=output[37]
        c5_2=output[38]
        c5_3=output[39]
        c5_4=output[40]
        c5_5=output[41]
        c5_7=output[42]
        c6_0=output[43]
        c6_1=output[44]
        c6_2=output[45]
        c6_3=output[46]
        c6_4=output[47]
        c6_5=output[48]
        c6_7=output[49]
        c7_0=output[50]
        c7_1=output[51]
        c7_2=output[52]
        c7_3=output[53]
        c7_4=output[54]
        c7_5=output[55]
        c7_7=output[56]
        c8_0=output[57]
        c8_1=output[58]
        c8_2=output[59]
        c8_3=output[60]
        c8_4=output[61]
        c8_5=output[62]
        c8_7=output[63]
        c9_0=output[64]
        c9_1=output[65]
        c9_2=output[66]
        c9_3=output[67]
        c9_4=output[68]
        c9_5=output[69]
        c9_7=output[70]
        c10_0=output[71]
        c10_1=output[72]
        c10_2=output[73]
        c10_3=output[74]
        c10_4=output[75]
        c10_5=output[76]
        c10_7=output[77]
        c11_0=output[78]
        c11_1=output[79]
        c11_2=output[80]
        c11_3=output[81]
        c11_4=output[82]
        c11_5=output[83]
        c11_7=output[84]
        c12_0=output[85]
        c12_1=output[86]
        c12_2=output[87]
        c12_3=output[88]
        c12_4=output[89]
        c12_5=output[90]
        c12_7=output[91]
        c13_0=output[92]
        c13_1=output[93]
        c13_2=output[94]
        c13_3=output[95]
        c13_4=output[96]
        c13_5=output[97]
        c13_7=output[98]
        c14_0=output[99]
        c14_1=output[100]
        c14_2=output[101]
        c14_3=output[102]
        c14_4=output[103]
        c14_5=output[104]
        c14_7=output[105]
        c15_0=output[106]
        c15_1=output[107]
        c15_2=output[108]
        c15_3=output[109]
        c15_4=output[110]
        c15_5=output[111]
        c15_7=output[112]
        c16_0=output[113]
        c16_1=output[114]
        c16_2=output[115]
        c16_3=output[116]
        c16_4=output[117]
        c16_5=output[118]
        c16_7=output[119]
        c17_0=output[120]
        c17_1=output[121]
        c17_2=output[122]
        c17_3=output[123]
        c17_4=output[124]
        c17_5=output[125]
        c17_7=output[126]
        c18_0=output[127]
        c18_1=output[128]
        c18_2=output[129]
        c18_3=output[130]
        c18_4=output[131]
        c18_5=output[132]
        c18_7=output[133]
        c19_0=output[134]
        c19_1=output[135]
        c19_2=output[136]
        c19_3=output[137]
        c19_4=output[138]
        c19_5=output[139]
        c19_7=output[140]
        c20_0=output[141]
        c20_1=output[142]
        c20_2=output[143]
        c20_3=output[144]
        c20_4=output[145]
        c20_5=output[146]
        c20_7=output[147]
        c21_0=output[148]
        c21_1=output[149]
        c21_2=output[150]
        c21_3=output[151]
        c21_4=output[152]
        c21_5=output[153]
        c21_7=output[154]
        c22_0=output[155]
        c22_1=output[156]
        c22_2=output[157]
        c22_3=output[158]
        c22_4=output[159]
        c22_5=output[160]
        c22_7=output[161]
        c23_0=output[162]
        c23_1=output[163]
        c23_2=output[164]
        c23_3=output[165]
        c23_4=output[166]
        c23_5=output[167]
        c23_7=output[168]
        c24_0=output[169]
        c24_1=output[170]
        c24_2=output[171]
        c24_3=output[172]
        c24_4=output[173]
        c24_5=output[174]
        c24_7=output[175]
        c25_0=output[176]
        c25_1=output[177]
        c25_2=output[178]
        c25_3=output[179]
        c25_4=output[180]
        c25_5=output[181]
        c25_7=output[182]
        c26_0=output[183]
        c26_1=output[194]
        c26_2=output[185]
        c26_3=output[186]
        c26_4=output[187]
        c26_5=output[188]
        c26_7=output[189]
        c27_0=output[190]
        c27_1=output[191]
        c27_2=output[192]
        c27_3=output[193]
        c27_4=output[194]
        c27_5=output[195]
        c27_7=output[196]
        c28_0=output[197]
        c28_1=output[198]
        c28_2=output[199]
        c28_3=output[200]
        c28_4=output[201]
        c28_5=output[202]
        c28_7=output[203]
        c29_0=output[204]
        c29_1=output[205]
        c29_2=output[206]
        c29_3=output[207]
        c29_4=output[208]
        c29_5=output[209]
        c29_7=output[210]
        c30_0=output[211]
        c30_1=output[212]
        c30_2=output[213]
        c30_3=output[214]
        c30_4=output[215]
        c30_5=output[216]
        c30_7=output[217]
        c31_0=output[218]
        c31_1=output[219]
        c31_2=output[220]
        c31_3=output[221]
        c31_4=output[222]
        c31_5=output[223]
        c31_7=output[224]
        c32_0=output[225]
        c32_1=output[226]
        c32_2=output[227]
        c32_3=output[228]
        c32_4=output[229]
        c32_5=output[230]
        c32_7=output[231]
        c33_0=output[232]
        c33_1=output[233]
        c33_2=output[234]
        c33_3=output[235]
        c33_4=output[236]
        c33_5=output[237]
        c33_7=output[238]
        c34_0=output[239]
        c34_1=output[240]
        c34_2=output[241]
        c34_3=output[242]
        c34_4=output[243]
        c34_5=output[244]
        c34_7=output[245]
        c35_0=output[246]
        c35_1=output[247]
        c35_2=output[248]
        c35_3=output[249]
        c35_4=output[250]
        c35_5=output[251]
        c35_7=output[252]
        c36_0=output[253]
        c36_1=output[254]
        c36_2=output[255]
        c36_3=output[256]
        c36_4=output[257]
        c36_5=output[258]
        c36_7=output[259]
        c37_0=output[260]
        c37_1=output[261]
        c37_2=output[262]
        c37_3=output[263]
        c37_4=output[264]
        c37_5=output[265]
        c37_7=output[266]
        c38_0=output[267]
        c38_1=output[268]
        c38_2=output[269]
        c38_3=output[270]
        c38_4=output[271]
        c38_5=output[272]
        c38_7=output[273]
        c39_0=output[274]
        c39_1=output[275]
        c39_2=output[276]
        c39_3=output[277]
        c39_4=output[278]
        c39_5=output[279]
        c39_7=output[280]
        c40_0=output[281]
        c40_1=output[282]
        c40_2=output[283]
        c40_3=output[284]
        c40_4=output[285]
        c40_5=output[286]
        c40_7=output[287]
        c41_0=output[288]
        c41_1=output[289]
        c41_2=output[290]
        c41_3=output[291]
        c41_4=output[292]
        c41_5=output[293]
        c41_7=output[294]
        c42_0=output[295]
        c42_1=output[296]
        c42_2=output[297]
        c42_3=output[298]
        c42_4=output[299]
        c42_5=output[300]
        c42_7=output[301]
        c43_0=output[302]
        c43_1=output[303]
        c43_2=output[304]
        c43_3=output[305]
        c43_4=output[306]
        c43_5=output[307]
        c43_7=output[308]
        c44_0=output[309]
        c44_1=output[310]
        c44_2=output[311]
        c44_3=output[312]
        c44_4=output[313]
        c44_5=output[314]
        c44_7=output[315]
        c45_0=output[316]
        c45_1=output[317]
        c45_2=output[318]
        c45_3=output[319]
        c45_4=output[320]
        c45_5=output[321]
        c45_7=output[322]
        c46_0=output[323]
        c46_1=output[324]
        c46_2=output[325]
        c46_3=output[326]
        c46_4=output[327]
        c46_5=output[328]
        c46_7=output[329]
        c47_0=output[330]
        c47_1=output[331]
        c47_2=output[332]
        c47_3=output[333]
        c47_4=output[334]
        c47_5=output[335]
        c47_7=output[336]
        c48_0=output[337]
        c48_1=output[338]
        c48_2=output[339]
        c48_3=output[340]
        c48_4=output[341]
        c48_5=output[342]
        c48_7=output[343]
        c49_0=output[344]
        c49_1=output[345]
        c49_2=output[346]
        c49_3=output[347]
        c49_4=output[348]
        c49_5=output[349]
        c49_7=output[350]
        c50_0=output[351]
        c50_1=output[352]
        c50_2=output[353]
        c50_3=output[354]
        c50_4=output[355]
        c50_5=output[356]
        c50_7=output[357]
        c51_0=output[358]
        c51_1=output[359]
        c51_2=output[360]
        c51_3=output[361]
        c51_4=output[362]
        c51_5=output[363]
        c51_7=output[364]
        c52_0=output[365]
        c52_1=output[366]
        c52_2=output[367]
        c52_3=output[368]
        c52_4=output[369]
        c52_5=output[370]
        c52_7=output[371]
        c53_0=output[372]
        c53_1=output[373]
        c53_2=output[374]
        c53_3=output[375]
        c53_4=output[376]
        c53_5=output[377]
        c53_7=output[378]
        c54_0=output[379]
        c54_1=output[380]
        c54_2=output[381]
        c54_3=output[382]
        c54_4=output[383]
        c54_5=output[384]
        c54_7=output[385]
        c55_0=output[386]
        c55_1=output[387]
        c55_2=output[388]
        c55_3=output[389]
        c55_4=output[390]
        c55_5=output[391]
        c55_7=output[392]
        c56_0=output[393]
        c56_1=output[394]
        c56_2=output[395]
        c56_3=output[396]
        c56_4=output[397]
        c56_5=output[398]
        c56_7=output[399]
        c57_0=output[400]
        c57_1=output[401]
        c57_2=output[402]
        c57_3=output[403]
        c57_4=output[404]
        c57_5=output[405]
        c57_7=output[406]
        c58_0=output[407]
        c58_1=output[408]
        c58_2=output[409]
        c58_3=output[410]
        c58_4=output[411]
        c58_5=output[412]
        c58_7=output[413]
        c59_0=output[414]
        c59_1=output[415]
        c59_2=output[416]
        c59_3=output[417]
        c59_4=output[418]
        c59_5=output[419]
        c59_7=output[420]
        c60_0=output[421]
        c60_1=output[422]
        c60_2=output[423]
        c60_3=output[424]
        c60_4=output[425]
        c60_5=output[426]
        c60_7=output[427]
        c61_0=output[428]
        c61_1=output[429]
        c61_2=output[430]
        c61_3=output[431]
        c61_4=output[432]
        c61_5=output[433]
        c61_7=output[434]
        c62_0=output[435]
        c62_1=output[436]
        c62_2=output[437]
        c62_3=output[438]
        c62_4=output[439]
        c62_5=output[440]
        c62_7=output[441]
        c63_0=output[442]
        c63_1=output[443]
        c63_2=output[444]
        c63_3=output[445]
        c63_4=output[446]
        c63_5=output[447]
        c63_7=output[448]
        c64_0=output[449]
        c64_1=output[450]
        c64_2=output[451]
        c64_3=output[452]
        c64_4=output[453]
        c64_5=output[454]
        c64_7=output[455]
        c65_0=output[456]
        c65_1=output[457]
        c65_2=output[458]
        c65_3=output[459]
        c65_4=output[460]
        c65_5=output[461]
        c65_7=output[462]
        c66_0=output[463]
        c66_1=output[464]
        c66_2=output[465]
        c66_3=output[466]
        c66_4=output[467]
        c66_5=output[468]
        c66_7=output[469]
        c67_0=output[470]
        c67_1=output[471]
        c67_2=output[472]
        c67_3=output[473]
        c67_4=output[474]
        c67_5=output[475]
        c67_7=output[476]
        c68_0=output[477]
        c68_1=output[478]
        c68_2=output[479]
        c68_3=output[480]
        c68_4=output[481]
        c68_5=output[482]
        c68_7=output[483]
        c69_0=output[484]
        c69_1=output[485]
        c69_2=output[486]
        c69_3=output[487]
        c69_4=output[488]
        c69_5=output[489]
        c69_7=output[490]
        c70_0=output[491]
        c70_1=output[492]
        c70_2=output[493]
        c70_3=output[494]
        c70_4=output[495]
        c70_5=output[496]
        c70_7=output[497]
        c71_0=output[498]
        c71_1=output[499]
        c71_2=output[500]
        c71_3=output[501]
        c71_4=output[502]
        c71_5=output[503]
        c71_7=output[504]
        c72_0=output[505]
        c72_1=output[506]
        c72_2=output[507]
        c72_3=output[508]
        c72_4=output[509]
        c72_5=output[510]
        c72_7=output[511]
        c73_0=output[512]
        c73_1=output[513]
        c73_2=output[514]
        c73_3=output[515]
        c73_4=output[516]
        c73_5=output[517]
        c73_7=output[518]
        c74_0=output[519]
        c74_1=output[520]
        c74_2=output[521]
        c74_3=output[522]
        c74_4=output[523]
        c74_5=output[524]
        c74_7=output[525]
        c75_0=output[526]
        c75_1=output[527]
        c75_2=output[528]
        c75_3=output[529]
        c75_4=output[530]
        c75_5=output[531]
        c75_7=output[532]
        c76_0=output[533]
        c76_1=output[534]
        c76_2=output[535]
        c76_3=output[536]
        c76_4=output[537]
        c76_5=output[538]
        c76_7=output[539]
        c77_0=output[540]
        c77_1=output[541]
        c77_2=output[542]
        c77_3=output[543]
        c77_4=output[544]
        c77_5=output[545]
        c77_7=output[546]
        c78_0=output[547]
        c78_1=output[548]
        c78_2=output[549]
        c78_3=output[550]
        c78_4=output[551]
        c78_5=output[552]
        c78_7=output[553]
        c79_0=output[554]
        c79_1=output[555]
        c79_2=output[556]
        c79_3=output[557]
        c79_4=output[558]
        c79_5=output[559]
        c79_7=output[560]
        c80_0=output[561]
        c80_1=output[562]
        c80_2=output[563]
        c80_3=output[564]
        c80_4=output[565]
        c80_5=output[566]
        c80_7=output[567]
        c81_0=output[568]
        c81_1=output[569]
        c81_2=output[570]
        c81_3=output[571]
        c81_4=output[572]
        c81_5=output[573]
        c81_7=output[574]
        c82_0=output[575]
        c82_1=output[576]
        c82_2=output[577]
        c82_3=output[578]
        c82_4=output[579]
        c82_5=output[580]
        c82_7=output[581]
        c83_0=output[582]
        c83_1=output[583]
        c83_2=output[584]
        c83_3=output[585]
        c83_4=output[586]
        c83_5=output[587]
        c83_7=output[588]
        c84_0=output[589]
        c84_1=output[590]
        c84_2=output[591]
        c84_3=output[592]
        c84_4=output[593]
        c84_5=output[594]
        c84_7=output[595]
        c85_0=output[596]
        c85_1=output[597]
        c85_2=output[598]
        c85_3=output[599]
        c85_4=output[600]
        c85_5=output[601]
        c85_7=output[602]
        c86_0=output[603]
        c86_1=output[604]
        c86_2=output[605]
        c86_3=output[606]
        c86_4=output[607]
        c86_5=output[608]
        c86_7=output[609]
        c87_0=output[610]
        c87_1=output[611]
        c87_2=output[612]
        c87_3=output[613]
        c87_4=output[614]
        c87_5=output[615]
        c87_7=output[616]
        c88_0=output[617]
        c88_1=output[618]
        c88_2=output[619]
        c88_3=output[620]
        c88_4=output[621]
        c88_5=output[622]
        c88_7=output[623]
        c89_0=output[624]
        c89_1=output[625]
        c89_2=output[626]
        c89_3=output[627]
        c89_4=output[628]
        c89_5=output[629]
        c89_7=output[630]
        c90_0=output[631]
        c90_1=output[632]
        c90_2=output[633]
        c90_3=output[634]
        c90_4=output[635]
        c90_5=output[636]
        c90_7=output[637]
        c91_0=output[638]
        c91_1=output[639]
        c91_2=output[640]
        c91_3=output[641]
        c91_4=output[642]
        c91_5=output[643]
        c91_7=output[644]
        c92_0=output[645]
        c92_1=output[646]
        c92_2=output[647]
        c92_3=output[648]
        c92_4=output[649]
        c92_5=output[650]
        c92_7=output[651]
        c93_0=output[652]
        c93_1=output[653]
        c93_2=output[654]
        c93_3=output[655]
        c93_4=output[656]
        c93_5=output[657]
        c93_7=output[658]
        c94_0=output[659]
        c94_1=output[660]
        c94_2=output[661]
        c94_3=output[662]
        c94_4=output[663]
        c94_5=output[664]
        c94_7=output[665]
        c95_0=output[666]
        c95_1=output[667]
        c95_2=output[668]
        c95_3=output[669]
        c95_4=output[670]
        c95_5=output[671]
        c95_7=output[672]
        c96_loop=int(output[673])
        speed0=float(output[674])
        speed1=float(output[675])
        speed2=float(output[676])
        speed3=float(output[677])
        speed4=float(output[678])
        speed5=float(output[679])
        speed6=float(output[680])
        speed7=float(output[681])
        speed8=float(output[682])
        speed9=float(output[683])
        speed10=float(output[684])
        speed11=float(output[685])
        speed12=float(output[686])
        speed13=float(output[687])
        speed14=float(output[688])
        speed15=float(output[689])
        speed16=float(output[690])
        speed17=float(output[691])
        speed18=float(output[692])
        speed19=float(output[693])
        speed20=float(output[694])
        speed21=float(output[695])
        speed22=float(output[696])
        speed23=float(output[697])
        speed24=float(output[698])
        speed25=float(output[699])
        speed26=float(output[700])
        speed27=float(output[701])
        speed28=float(output[702])
        speed29=float(output[703])
        speed30=float(output[704])
        speed31=float(output[705])
        speed32=float(output[706])
        speed33=float(output[707])
        speed34=float(output[708])
        speed35=float(output[709])
        speed36=float(output[710])
        speed37=float(output[711])
        speed38=float(output[712])
        speed39=float(output[713])
        speed40=float(output[714])
        speed41=float(output[715])
        speed42=float(output[716])
        speed43=float(output[717])
        speed44=float(output[718])
        speed45=float(output[719])
        speed46=float(output[720])
        speed47=float(output[721])
        speed48=float(output[722])
        speed49=float(output[723])
        speed50=float(output[724])
        speed51=float(output[725])
        speed52=float(output[726])
        speed53=float(output[727])
        speed54=float(output[728])
        speed55=float(output[729])
        speed56=float(output[730])
        speed57=float(output[731])
        speed58=float(output[732])
        speed59=float(output[733])
        speed60=float(output[734])
        speed61=float(output[735])
        speed62=float(output[736])
        speed63=float(output[737])
        speed64=float(output[738])
        speed65=float(output[739])
        speed66=float(output[740])
        speed67=float(output[741])
        speed68=float(output[742])
        speed69=float(output[743])
        speed70=float(output[744])
        speed71=float(output[745])
        speed72=float(output[746])
        speed73=float(output[747])
        speed74=float(output[748])
        speed75=float(output[749])
        speed76=float(output[750])
        speed77=float(output[751])
        speed78=float(output[752])
        speed79=float(output[753])
        speed80=float(output[754])
        speed81=float(output[755])
        speed82=float(output[756])
        speed83=float(output[757])
        speed84=float(output[758])
        speed85=float(output[759])
        speed86=float(output[760])
        speed87=float(output[761])
        speed88=float(output[762])
        speed89=float(output[763])
        speed90=float(output[764])
        speed91=float(output[765])
        speed92=float(output[766])
        speed93=float(output[767])
        speed94=float(output[768])
        speed95=float(output[769])
        repeat=float(output[770])
        loop=int(output[771])

    show_speed0.set(speed0)
    showspeed0.configure(text=show_speed0.get())
    show_speed1.set(speed1)
    showspeed1.configure(text=show_speed1.get())
    show_speed2.set(speed2)
    showspeed2.configure(text=show_speed2.get())
    show_speed3.set(speed3)
    showspeed3.configure(text=show_speed3.get())
    show_speed4.set(speed4)
    showspeed4.configure(text=show_speed4.get())
    show_speed5.set(speed5)
    showspeed5.configure(text=show_speed5.get())
    show_speed6.set(speed6)
    showspeed6.configure(text=show_speed6.get())
    show_speed7.set(speed7)
    showspeed7.configure(text=show_speed7.get())
    show_speed8.set(speed8)
    showspeed8.configure(text=show_speed8.get())
    show_speed9.set(speed9)
    showspeed9.configure(text=show_speed9.get())
    show_speed10.set(speed10)
    showspeed10.configure(text=show_speed10.get())
    show_speed11.set(speed11)
    showspeed11.configure(text=show_speed11.get())
    show_speed12.set(speed12)
    showspeed12.configure(text=show_speed12.get())
    show_speed13.set(speed13)
    showspeed13.configure(text=show_speed13.get())
    show_speed14.set(speed14)
    showspeed14.configure(text=show_speed14.get())
    show_speed15.set(speed15)
    showspeed15.configure(text=show_speed15.get())
    show_speed16.set(speed16)
    showspeed16.configure(text=show_speed16.get())
    show_speed17.set(speed17)
    showspeed17.configure(text=show_speed17.get())
    show_speed18.set(speed18)
    showspeed18.configure(text=show_speed18.get())
    show_speed19.set(speed19)
    showspeed19.configure(text=show_speed19.get())
    show_speed20.set(speed20)
    showspeed20.configure(text=show_speed20.get())
    show_speed21.set(speed21)
    showspeed21.configure(text=show_speed21.get())
    show_speed22.set(speed22)
    showspeed22.configure(text=show_speed22.get())
    show_speed23.set(speed23)
    showspeed23.configure(text=show_speed23.get())
    show_speed24.set(speed24)
    showspeed24.configure(text=show_speed24.get())
    show_speed25.set(speed25)
    showspeed25.configure(text=show_speed25.get())
    show_speed26.set(speed26)
    showspeed26.configure(text=show_speed26.get())
    show_speed27.set(speed27)
    showspeed27.configure(text=show_speed27.get())
    show_speed28.set(speed28)
    showspeed28.configure(text=show_speed28.get())
    show_speed29.set(speed29)
    showspeed29.configure(text=show_speed29.get())
    show_speed30.set(speed30)
    showspeed30.configure(text=show_speed30.get())
    show_speed31.set(speed31)
    showspeed31.configure(text=show_speed31.get())
    show_speed32.set(speed32)
    showspeed32.configure(text=show_speed32.get())
    show_speed33.set(speed33)
    showspeed33.configure(text=show_speed33.get())
    show_speed34.set(speed34)
    showspeed34.configure(text=show_speed34.get())
    show_speed35.set(speed35)
    showspeed35.configure(text=show_speed35.get())
    show_speed36.set(speed36)
    showspeed36.configure(text=show_speed36.get())
    show_speed37.set(speed37)
    showspeed37.configure(text=show_speed37.get())
    show_speed38.set(speed38)
    showspeed38.configure(text=show_speed38.get())
    show_speed39.set(speed39)
    showspeed39.configure(text=show_speed39.get())
    show_speed40.set(speed40)
    showspeed40.configure(text=show_speed40.get())
    show_speed41.set(speed41)
    showspeed41.configure(text=show_speed41.get())
    show_speed42.set(speed42)
    showspeed42.configure(text=show_speed42.get())
    show_speed43.set(speed43)
    showspeed43.configure(text=show_speed43.get())
    show_speed44.set(speed44)
    showspeed44.configure(text=show_speed44.get())
    show_speed45.set(speed45)
    showspeed45.configure(text=show_speed45.get())
    show_speed46.set(speed46)
    showspeed46.configure(text=show_speed46.get())
    show_speed47.set(speed47)
    showspeed47.configure(text=show_speed47.get())
    show_speed48.set(speed48)
    showspeed48.configure(text=show_speed48.get())
    show_speed49.set(speed49)
    showspeed49.configure(text=show_speed49.get())
    show_speed50.set(speed50)
    showspeed50.configure(text=show_speed50.get())
    show_speed51.set(speed51)
    showspeed51.configure(text=show_speed51.get())
    show_speed52.set(speed52)
    showspeed52.configure(text=show_speed52.get())
    show_speed53.set(speed53)
    showspeed53.configure(text=show_speed53.get())
    show_speed54.set(speed54)
    showspeed54.configure(text=show_speed54.get())
    show_speed55.set(speed55)
    showspeed55.configure(text=show_speed55.get())
    show_speed56.set(speed56)
    showspeed56.configure(text=show_speed56.get())
    show_speed57.set(speed57)
    showspeed57.configure(text=show_speed57.get())
    show_speed58.set(speed58)
    showspeed58.configure(text=show_speed58.get())
    show_speed59.set(speed59)
    showspeed59.configure(text=show_speed59.get())
    show_speed60.set(speed60)
    showspeed60.configure(text=show_speed60.get())
    show_speed61.set(speed61)
    showspeed61.configure(text=show_speed61.get())
    show_speed62.set(speed62)
    showspeed62.configure(text=show_speed62.get())
    show_speed63.set(speed63)
    showspeed63.configure(text=show_speed63.get())
    show_speed64.set(speed64)
    showspeed64.configure(text=show_speed64.get())
    show_speed65.set(speed65)
    showspeed65.configure(text=show_speed65.get())
    show_speed66.set(speed66)
    showspeed66.configure(text=show_speed66.get())
    show_speed67.set(speed67)
    showspeed67.configure(text=show_speed67.get())
    show_speed68.set(speed68)
    showspeed68.configure(text=show_speed68.get())
    show_speed69.set(speed69)
    showspeed69.configure(text=show_speed69.get())
    show_speed70.set(speed70)
    showspeed70.configure(text=show_speed70.get())
    show_speed71.set(speed71)
    showspeed71.configure(text=show_speed71.get())
    show_speed72.set(speed72)
    showspeed72.configure(text=show_speed72.get())
    show_speed73.set(speed73)
    showspeed73.configure(text=show_speed73.get())
    show_speed74.set(speed74)
    showspeed74.configure(text=show_speed74.get())
    show_speed75.set(speed75)
    showspeed75.configure(text=show_speed75.get())
    show_speed76.set(speed76)
    showspeed76.configure(text=show_speed76.get())
    show_speed77.set(speed77)
    showspeed77.configure(text=show_speed77.get())
    show_speed78.set(speed78)
    showspeed78.configure(text=show_speed78.get())
    show_speed79.set(speed79)
    showspeed79.configure(text=show_speed79.get())
    show_speed80.set(speed80)
    showspeed80.configure(text=show_speed80.get())
    show_speed81.set(speed81)
    showspeed81.configure(text=show_speed81.get())
    show_speed82.set(speed82)
    showspeed82.configure(text=show_speed82.get())
    show_speed83.set(speed83)
    showspeed83.configure(text=show_speed83.get())
    show_speed84.set(speed84)
    showspeed84.configure(text=show_speed84.get())
    show_speed85.set(speed85)
    showspeed85.configure(text=show_speed85.get())
    show_speed86.set(speed86)
    showspeed86.configure(text=show_speed86.get())
    show_speed87.set(speed87)
    showspeed87.configure(text=show_speed87.get())
    show_speed88.set(speed88)
    showspeed88.configure(text=show_speed88.get())
    show_speed89.set(speed89)
    showspeed89.configure(text=show_speed89.get())
    show_speed90.set(speed90)
    showspeed90.configure(text=show_speed90.get())
    show_speed91.set(speed91)
    showspeed91.configure(text=show_speed91.get())
    show_speed92.set(speed92)
    showspeed92.configure(text=show_speed92.get())
    show_speed93.set(speed93)
    showspeed93.configure(text=show_speed93.get())
    show_speed94.set(speed94)
    showspeed94.configure(text=show_speed94.get())
    show_speed95.set(speed95)
    showspeed95.configure(text=show_speed95.get())
    show_repeat.set(repeat)
    showrepeat.configure(text=show_repeat.get())
    show_loop.set(loop)
    showloop.configure(text=show_loop.get())


    if c0_0=='0' and b0_0var.get()==1:
        b0_0.invoke()
    if c0_0=='1' and b0_0var.get()==0:
        b0_0.invoke()
    if c0_1=='0' and b0_1var.get()==1:
        b0_1.invoke()
    if c0_1=='1' and b0_1var.get()==0:
        b0_1.invoke()
    if c0_2=='0' and b0_2var.get()==1:
        b0_2.invoke()
    if c0_2=='1' and b0_2var.get()==0:
        b0_2.invoke()
    if c0_3=='0' and b0_3var.get()==1:
        b0_3.invoke()
    if c0_3=='1' and b0_3var.get()==0:
        b0_3.invoke()
    if c0_4=='0' and b0_4var.get()==1:
        b0_4.invoke()
    if c0_4=='1' and b0_4var.get()==0:
        b0_4.invoke()
    if c0_5=='0' and b0_5var.get()==1:
        b0_5.invoke()
    if c0_5=='1' and b0_5var.get()==0:
        b0_5.invoke()
    if c0_6=='0' and b0_6var.get()==1:
        b0_6.invoke()
    if c0_6=='1' and b0_6var.get()==0:
        b0_6.invoke()
    if c0_7=='0' and b0_7var.get()==1:
        b0_7.invoke()
    if c0_7=='1' and b0_7var.get()==0:
        b0_7.invoke()


    if c1_0=='0' and b1_0var.get()==1:
        b1_0.invoke()
    if c1_0=='1' and b1_0var.get()==0:
        b1_0.invoke()
    if c1_1=='0' and b1_1var.get()==1:
        b1_1.invoke()
    if c1_1=='1' and b1_1var.get()==0:
        b1_1.invoke()
    if c1_2=='0' and b1_2var.get()==1:
        b1_2.invoke()
    if c1_2=='1' and b1_2var.get()==0:
        b1_2.invoke()
    if c1_3=='0' and b1_3var.get()==1:
        b1_3.invoke()
    if c1_3=='1' and b1_3var.get()==0:
        b1_3.invoke()
    if c1_4=='0' and b1_4var.get()==1:
        b1_4.invoke()
    if c1_4=='1' and b1_4var.get()==0:
        b1_4.invoke()
    if c1_5=='0' and b1_5var.get()==1:
        b1_5.invoke()
    if c1_5=='1' and b1_5var.get()==0:
        b1_5.invoke()
    if c1_7=='0' and b1_7var.get()==1:
        b1_7.invoke()
    if c1_7=='1' and b1_7var.get()==0:
        b1_7.invoke()

    if c2_0=='0' and b2_0var.get()==1:
        b2_0.invoke()
    if c2_0=='1' and b2_0var.get()==0:
        b2_0.invoke()
    if c2_1=='0' and b2_1var.get()==1:
        b2_1.invoke()
    if c2_1=='1' and b2_1var.get()==0:
        b2_1.invoke()
    if c2_2=='0' and b2_2var.get()==1:
        b2_2.invoke()
    if c2_2=='1' and b2_2var.get()==0:
        b2_2.invoke()
    if c2_3=='0' and b2_3var.get()==1:
        b2_3.invoke()
    if c2_3=='1' and b2_3var.get()==0:
        b2_3.invoke()
    if c2_4=='0' and b2_4var.get()==1:
        b2_4.invoke()
    if c2_4=='1' and b2_4var.get()==0:
        b2_4.invoke()
    if c2_5=='0' and b2_5var.get()==1:
        b2_5.invoke()
    if c2_5=='1' and b2_5var.get()==0:
        b2_5.invoke()
    if c2_7=='0' and b2_7var.get()==1:
        b2_7.invoke()
    if c2_7=='1' and b2_7var.get()==0:
        b2_7.invoke()

    if c3_0=='0' and b3_0var.get()==1:
        b3_0.invoke()
    if c3_0=='1' and b3_0var.get()==0:
        b3_0.invoke()
    if c3_1=='0' and b3_1var.get()==1:
        b3_1.invoke()
    if c3_1=='1' and b3_1var.get()==0:
        b3_1.invoke()
    if c3_2=='0' and b3_2var.get()==1:
        b3_2.invoke()
    if c3_2=='1' and b3_2var.get()==0:
        b3_2.invoke()
    if c3_3=='0' and b3_3var.get()==1:
        b3_3.invoke()
    if c3_3=='1' and b3_3var.get()==0:
        b3_3.invoke()
    if c3_4=='0' and b3_4var.get()==1:
        b3_4.invoke()
    if c3_4=='1' and b3_4var.get()==0:
        b3_4.invoke()
    if c3_5=='0' and b3_5var.get()==1:
        b3_5.invoke()
    if c3_5=='1' and b3_5var.get()==0:
        b3_5.invoke()
    if c3_7=='0' and b3_7var.get()==1:
        b3_7.invoke()
    if c3_7=='1' and b3_7var.get()==0:
        b3_7.invoke()

    if c4_0=='0' and b4_0var.get()==1:
        b4_0.invoke()
    if c4_0=='1' and b4_0var.get()==0:
        b4_0.invoke()
    if c4_1=='0' and b4_1var.get()==1:
        b4_1.invoke()
    if c4_1=='1' and b4_1var.get()==0:
        b4_1.invoke()
    if c4_2=='0' and b4_2var.get()==1:
        b4_2.invoke()
    if c4_2=='1' and b4_2var.get()==0:
        b4_2.invoke()
    if c4_3=='0' and b4_3var.get()==1:
        b4_3.invoke()
    if c4_3=='1' and b4_3var.get()==0:
        b4_3.invoke()
    if c4_4=='0' and b4_4var.get()==1:
        b4_4.invoke()
    if c4_4=='1' and b4_4var.get()==0:
        b4_4.invoke()
    if c4_5=='0' and b4_5var.get()==1:
        b4_5.invoke()
    if c4_5=='1' and b4_5var.get()==0:
        b4_5.invoke()
    if c4_7=='0' and b4_7var.get()==1:
        b4_7.invoke()
    if c4_7=='1' and b4_7var.get()==0:
        b4_7.invoke()

    if c5_0=='0' and b5_0var.get()==1:
        b5_0.invoke()
    if c5_0=='1' and b5_0var.get()==0:
        b5_0.invoke()
    if c5_1=='0' and b5_1var.get()==1:
        b5_1.invoke()
    if c5_1=='1' and b5_1var.get()==0:
        b5_1.invoke()
    if c5_2=='0' and b5_2var.get()==1:
        b5_2.invoke()
    if c5_2=='1' and b5_2var.get()==0:
        b5_2.invoke()
    if c5_3=='0' and b5_3var.get()==1:
        b5_3.invoke()
    if c5_3=='1' and b5_3var.get()==0:
        b5_3.invoke()
    if c5_4=='0' and b5_4var.get()==1:
        b5_4.invoke()
    if c5_4=='1' and b5_4var.get()==0:
        b5_4.invoke()
    if c5_5=='0' and b5_5var.get()==1:
        b5_5.invoke()
    if c5_5=='1' and b5_5var.get()==0:
        b5_5.invoke()
    if c5_7=='0' and b5_7var.get()==1:
        b5_7.invoke()
    if c5_7=='1' and b5_7var.get()==0:
        b5_7.invoke()

    if c6_0=='0' and b6_0var.get()==1:
        b6_0.invoke()
    if c6_0=='1' and b6_0var.get()==0:
        b6_0.invoke()
    if c6_1=='0' and b6_1var.get()==1:
        b6_1.invoke()
    if c6_1=='1' and b6_1var.get()==0:
        b6_1.invoke()
    if c6_2=='0' and b6_2var.get()==1:
        b6_2.invoke()
    if c6_2=='1' and b6_2var.get()==0:
        b6_2.invoke()
    if c6_3=='0' and b6_3var.get()==1:
        b6_3.invoke()
    if c6_3=='1' and b6_3var.get()==0:
        b6_3.invoke()
    if c6_4=='0' and b6_4var.get()==1:
        b6_4.invoke()
    if c6_4=='1' and b6_4var.get()==0:
        b6_4.invoke()
    if c6_5=='0' and b6_5var.get()==1:
        b6_5.invoke()
    if c6_5=='1' and b6_5var.get()==0:
        b6_5.invoke()
    if c6_7=='0' and b6_7var.get()==1:
        b6_7.invoke()
    if c6_7=='1' and b6_7var.get()==0:
        b6_7.invoke()

    if c7_0=='0' and b7_0var.get()==1:
        b7_0.invoke()
    if c7_0=='1' and b7_0var.get()==0:
        b7_0.invoke()
    if c7_1=='0' and b7_1var.get()==1:
        b7_1.invoke()
    if c7_1=='1' and b7_1var.get()==0:
        b7_1.invoke()
    if c7_2=='0' and b7_2var.get()==1:
        b7_2.invoke()
    if c7_2=='1' and b7_2var.get()==0:
        b7_2.invoke()
    if c7_3=='0' and b7_3var.get()==1:
        b7_3.invoke()
    if c7_3=='1' and b7_3var.get()==0:
        b7_3.invoke()
    if c7_4=='0' and b7_4var.get()==1:
        b7_4.invoke()
    if c7_4=='1' and b7_4var.get()==0:
        b7_4.invoke()
    if c7_5=='0' and b7_5var.get()==1:
        b7_5.invoke()
    if c7_5=='1' and b7_5var.get()==0:
        b7_5.invoke()
    if c7_7=='0' and b7_7var.get()==1:
        b7_7.invoke()
    if c7_7=='1' and b7_7var.get()==0:
        b7_7.invoke()

    if c8_0=='0' and b8_0var.get()==1:
        b8_0.invoke()
    if c8_0=='1' and b8_0var.get()==0:
        b8_0.invoke()
    if c8_1=='0' and b8_1var.get()==1:
        b8_1.invoke()
    if c8_1=='1' and b8_1var.get()==0:
        b8_1.invoke()
    if c8_2=='0' and b8_2var.get()==1:
        b8_2.invoke()
    if c8_2=='1' and b8_2var.get()==0:
        b8_2.invoke()
    if c8_3=='0' and b8_3var.get()==1:
        b8_3.invoke()
    if c8_3=='1' and b8_3var.get()==0:
        b8_3.invoke()
    if c8_4=='0' and b8_4var.get()==1:
        b8_4.invoke()
    if c8_4=='1' and b8_4var.get()==0:
        b8_4.invoke()
    if c8_5=='0' and b8_5var.get()==1:
        b8_5.invoke()
    if c8_5=='1' and b8_5var.get()==0:
        b8_5.invoke()
    if c8_7=='0' and b8_7var.get()==1:
        b8_7.invoke()
    if c8_7=='1' and b8_7var.get()==0:
        b8_7.invoke()

    if c9_0=='0' and b9_0var.get()==1:
        b9_0.invoke()
    if c9_0=='1' and b9_0var.get()==0:
        b9_0.invoke()
    if c9_1=='0' and b9_1var.get()==1:
        b9_1.invoke()
    if c9_1=='1' and b9_1var.get()==0:
        b9_1.invoke()
    if c9_2=='0' and b9_2var.get()==1:
        b9_2.invoke()
    if c9_2=='1' and b9_2var.get()==0:
        b9_2.invoke()
    if c9_3=='0' and b9_3var.get()==1:
        b9_3.invoke()
    if c9_3=='1' and b9_3var.get()==0:
        b9_3.invoke()
    if c9_4=='0' and b9_4var.get()==1:
        b9_4.invoke()
    if c9_4=='1' and b9_4var.get()==0:
        b9_4.invoke()
    if c9_5=='0' and b9_5var.get()==1:
        b9_5.invoke()
    if c9_5=='1' and b9_5var.get()==0:
        b9_5.invoke()
    if c9_7=='0' and b9_7var.get()==1:
        b9_7.invoke()
    if c9_7=='1' and b9_7var.get()==0:
        b9_7.invoke()

    if c10_0=='0' and b10_0var.get()==1:
        b10_0.invoke()
    if c10_0=='1' and b10_0var.get()==0:
        b10_0.invoke()
    if c10_1=='0' and b10_1var.get()==1:
        b10_1.invoke()
    if c10_1=='1' and b10_1var.get()==0:
        b10_1.invoke()
    if c10_2=='0' and b10_2var.get()==1:
        b10_2.invoke()
    if c10_2=='1' and b10_2var.get()==0:
        b10_2.invoke()
    if c10_3=='0' and b10_3var.get()==1:
        b10_3.invoke()
    if c10_3=='1' and b10_3var.get()==0:
        b10_3.invoke()
    if c10_4=='0' and b10_4var.get()==1:
        b10_4.invoke()
    if c10_4=='1' and b10_4var.get()==0:
        b10_4.invoke()
    if c10_5=='0' and b10_5var.get()==1:
        b10_5.invoke()
    if c10_5=='1' and b10_5var.get()==0:
        b10_5.invoke()
    if c10_7=='0' and b10_7var.get()==1:
        b10_7.invoke()
    if c10_7=='1' and b10_7var.get()==0:
        b10_7.invoke()

    if c11_0=='0' and b11_0var.get()==1:
        b11_0.invoke()
    if c11_0=='1' and b11_0var.get()==0:
        b11_0.invoke()
    if c11_1=='0' and b11_1var.get()==1:
        b11_1.invoke()
    if c11_1=='1' and b11_1var.get()==0:
        b11_1.invoke()
    if c11_2=='0' and b11_2var.get()==1:
        b11_2.invoke()
    if c11_2=='1' and b11_2var.get()==0:
        b11_2.invoke()
    if c11_3=='0' and b11_3var.get()==1:
        b11_3.invoke()
    if c11_3=='1' and b11_3var.get()==0:
        b11_3.invoke()
    if c11_4=='0' and b11_4var.get()==1:
        b11_4.invoke()
    if c11_4=='1' and b11_4var.get()==0:
        b11_4.invoke()
    if c11_5=='0' and b11_5var.get()==1:
        b11_5.invoke()
    if c11_5=='1' and b11_5var.get()==0:
        b11_5.invoke()
    if c11_7=='0' and b11_7var.get()==1:
        b11_7.invoke()
    if c11_7=='1' and b11_7var.get()==0:
        b11_7.invoke()

    if c12_0=='0' and b12_0var.get()==1:
        b12_0.invoke()
    if c12_0=='1' and b12_0var.get()==0:
        b12_0.invoke()
    if c12_1=='0' and b12_1var.get()==1:
        b12_1.invoke()
    if c12_1=='1' and b12_1var.get()==0:
        b12_1.invoke()
    if c12_2=='0' and b12_2var.get()==1:
        b12_2.invoke()
    if c12_2=='1' and b12_2var.get()==0:
        b12_2.invoke()
    if c12_3=='0' and b12_3var.get()==1:
        b12_3.invoke()
    if c12_3=='1' and b12_3var.get()==0:
        b12_3.invoke()
    if c12_4=='0' and b12_4var.get()==1:
        b12_4.invoke()
    if c12_4=='1' and b12_4var.get()==0:
        b12_4.invoke()
    if c12_5=='0' and b12_5var.get()==1:
        b12_5.invoke()
    if c12_5=='1' and b12_5var.get()==0:
        b12_5.invoke()
    if c12_7=='0' and b12_7var.get()==1:
        b12_7.invoke()
    if c12_7=='1' and b12_7var.get()==0:
        b12_7.invoke()

    if c13_0=='0' and b13_0var.get()==1:
        b13_0.invoke()
    if c13_0=='1' and b13_0var.get()==0:
        b13_0.invoke()
    if c13_1=='0' and b13_1var.get()==1:
        b13_1.invoke()
    if c13_1=='1' and b13_1var.get()==0:
        b13_1.invoke()
    if c13_2=='0' and b13_2var.get()==1:
        b13_2.invoke()
    if c13_2=='1' and b13_2var.get()==0:
        b13_2.invoke()
    if c13_3=='0' and b13_3var.get()==1:
        b13_3.invoke()
    if c13_3=='1' and b13_3var.get()==0:
        b13_3.invoke()
    if c13_4=='0' and b13_4var.get()==1:
        b13_4.invoke()
    if c13_4=='1' and b13_4var.get()==0:
        b13_4.invoke()
    if c13_5=='0' and b13_5var.get()==1:
        b13_5.invoke()
    if c13_5=='1' and b13_5var.get()==0:
        b13_5.invoke()
    if c13_7=='0' and b13_7var.get()==1:
        b13_7.invoke()
    if c13_7=='1' and b13_7var.get()==0:
        b13_7.invoke()

    if c14_0=='0' and b14_0var.get()==1:
        b14_0.invoke()
    if c14_0=='1' and b14_0var.get()==0:
        b14_0.invoke()
    if c14_1=='0' and b14_1var.get()==1:
        b14_1.invoke()
    if c14_1=='1' and b14_1var.get()==0:
        b14_1.invoke()
    if c14_2=='0' and b14_2var.get()==1:
        b14_2.invoke()
    if c14_2=='1' and b14_2var.get()==0:
        b14_2.invoke()
    if c14_3=='0' and b14_3var.get()==1:
        b14_3.invoke()
    if c14_3=='1' and b14_3var.get()==0:
        b14_3.invoke()
    if c14_4=='0' and b14_4var.get()==1:
        b14_4.invoke()
    if c14_4=='1' and b14_4var.get()==0:
        b14_4.invoke()
    if c14_5=='0' and b14_5var.get()==1:
        b14_5.invoke()
    if c14_5=='1' and b14_5var.get()==0:
        b14_5.invoke()
    if c14_7=='0' and b14_7var.get()==1:
        b14_7.invoke()
    if c14_7=='1' and b14_7var.get()==0:
        b14_7.invoke()

    if c15_0=='0' and b15_0var.get()==1:
        b15_0.invoke()
    if c15_0=='1' and b15_0var.get()==0:
        b15_0.invoke()
    if c15_1=='0' and b15_1var.get()==1:
        b15_1.invoke()
    if c15_1=='1' and b15_1var.get()==0:
        b15_1.invoke()
    if c15_2=='0' and b15_2var.get()==1:
        b15_2.invoke()
    if c15_2=='1' and b15_2var.get()==0:
        b15_2.invoke()
    if c15_3=='0' and b15_3var.get()==1:
        b15_3.invoke()
    if c15_3=='1' and b15_3var.get()==0:
        b15_3.invoke()
    if c15_4=='0' and b15_4var.get()==1:
        b15_4.invoke()
    if c15_4=='1' and b15_4var.get()==0:
        b15_4.invoke()
    if c15_5=='0' and b15_5var.get()==1:
        b15_5.invoke()
    if c15_5=='1' and b15_5var.get()==0:
        b15_5.invoke()
    if c15_7=='0' and b15_7var.get()==1:
        b15_7.invoke()
    if c15_7=='1' and b15_7var.get()==0:
        b15_7.invoke()

    if c16_0=='0' and b16_0var.get()==1:
        b16_0.invoke()
    if c16_0=='1' and b16_0var.get()==0:
        b16_0.invoke()
    if c16_1=='0' and b16_1var.get()==1:
        b16_1.invoke()
    if c16_1=='1' and b16_1var.get()==0:
        b16_1.invoke()
    if c16_2=='0' and b16_2var.get()==1:
        b16_2.invoke()
    if c16_2=='1' and b16_2var.get()==0:
        b16_2.invoke()
    if c16_3=='0' and b16_3var.get()==1:
        b16_3.invoke()
    if c16_3=='1' and b16_3var.get()==0:
        b16_3.invoke()
    if c16_4=='0' and b16_4var.get()==1:
        b16_4.invoke()
    if c16_4=='1' and b16_4var.get()==0:
        b16_4.invoke()
    if c16_5=='0' and b16_5var.get()==1:
        b16_5.invoke()
    if c16_5=='1' and b16_5var.get()==0:
        b16_5.invoke()
    if c16_7=='0' and b16_7var.get()==1:
        b16_7.invoke()
    if c16_7=='1' and b16_7var.get()==0:
        b16_7.invoke()

    if c17_0=='0' and b17_0var.get()==1:
        b17_0.invoke()
    if c17_0=='1' and b17_0var.get()==0:
        b17_0.invoke()
    if c17_1=='0' and b17_1var.get()==1:
        b17_1.invoke()
    if c17_1=='1' and b17_1var.get()==0:
        b17_1.invoke()
    if c17_2=='0' and b17_2var.get()==1:
        b17_2.invoke()
    if c17_2=='1' and b17_2var.get()==0:
        b17_2.invoke()
    if c17_3=='0' and b17_3var.get()==1:
        b17_3.invoke()
    if c17_3=='1' and b17_3var.get()==0:
        b17_3.invoke()
    if c17_4=='0' and b17_4var.get()==1:
        b17_4.invoke()
    if c17_4=='1' and b17_4var.get()==0:
        b17_4.invoke()
    if c17_5=='0' and b17_5var.get()==1:
        b17_5.invoke()
    if c17_5=='1' and b17_5var.get()==0:
        b17_5.invoke()
    if c17_7=='0' and b17_7var.get()==1:
        b17_7.invoke()
    if c17_7=='1' and b17_7var.get()==0:
        b17_7.invoke()

    if c18_0=='0' and b18_0var.get()==1:
        b18_0.invoke()
    if c18_0=='1' and b18_0var.get()==0:
        b18_0.invoke()
    if c18_1=='0' and b18_1var.get()==1:
        b18_1.invoke()
    if c18_1=='1' and b18_1var.get()==0:
        b18_1.invoke()
    if c18_2=='0' and b18_2var.get()==1:
        b18_2.invoke()
    if c18_2=='1' and b18_2var.get()==0:
        b18_2.invoke()
    if c18_3=='0' and b18_3var.get()==1:
        b18_3.invoke()
    if c18_3=='1' and b18_3var.get()==0:
        b18_3.invoke()
    if c18_4=='0' and b18_4var.get()==1:
        b18_4.invoke()
    if c18_4=='1' and b18_4var.get()==0:
        b18_4.invoke()
    if c18_5=='0' and b18_5var.get()==1:
        b18_5.invoke()
    if c18_5=='1' and b18_5var.get()==0:
        b18_5.invoke()
    if c18_7=='0' and b18_7var.get()==1:
        b18_7.invoke()
    if c18_7=='1' and b18_7var.get()==0:
        b18_7.invoke()

    if c19_0=='0' and b19_0var.get()==1:
        b19_0.invoke()
    if c19_0=='1' and b19_0var.get()==0:
        b19_0.invoke()
    if c19_1=='0' and b19_1var.get()==1:
        b19_1.invoke()
    if c19_1=='1' and b19_1var.get()==0:
        b19_1.invoke()
    if c19_2=='0' and b19_2var.get()==1:
        b19_2.invoke()
    if c19_2=='1' and b19_2var.get()==0:
        b19_2.invoke()
    if c19_3=='0' and b19_3var.get()==1:
        b19_3.invoke()
    if c19_3=='1' and b19_3var.get()==0:
        b19_3.invoke()
    if c19_4=='0' and b19_4var.get()==1:
        b19_4.invoke()
    if c19_4=='1' and b19_4var.get()==0:
        b19_4.invoke()
    if c19_5=='0' and b19_5var.get()==1:
        b19_5.invoke()
    if c19_5=='1' and b19_5var.get()==0:
        b19_5.invoke()
    if c19_7=='0' and b19_7var.get()==1:
        b19_7.invoke()
    if c19_7=='1' and b19_7var.get()==0:
        b19_7.invoke()

    if c20_0=='0' and b20_0var.get()==1:
        b20_0.invoke()
    if c20_0=='1' and b20_0var.get()==0:
        b20_0.invoke()
    if c20_1=='0' and b20_1var.get()==1:
        b20_1.invoke()
    if c20_1=='1' and b20_1var.get()==0:
        b20_1.invoke()
    if c20_2=='0' and b20_2var.get()==1:
        b20_2.invoke()
    if c20_2=='1' and b20_2var.get()==0:
        b20_2.invoke()
    if c20_3=='0' and b20_3var.get()==1:
        b20_3.invoke()
    if c20_3=='1' and b20_3var.get()==0:
        b20_3.invoke()
    if c20_4=='0' and b20_4var.get()==1:
        b20_4.invoke()
    if c20_4=='1' and b20_4var.get()==0:
        b20_4.invoke()
    if c20_5=='0' and b20_5var.get()==1:
        b20_5.invoke()
    if c20_5=='1' and b20_5var.get()==0:
        b20_5.invoke()
    if c20_7=='0' and b20_7var.get()==1:
        b20_7.invoke()
    if c20_7=='1' and b20_7var.get()==0:
        b20_7.invoke()

    if c21_0=='0' and b21_0var.get()==1:
        b21_0.invoke()
    if c21_0=='1' and b21_0var.get()==0:
        b21_0.invoke()
    if c21_1=='0' and b21_1var.get()==1:
        b21_1.invoke()
    if c21_1=='1' and b21_1var.get()==0:
        b21_1.invoke()
    if c21_2=='0' and b21_2var.get()==1:
        b21_2.invoke()
    if c21_2=='1' and b21_2var.get()==0:
        b21_2.invoke()
    if c21_3=='0' and b21_3var.get()==1:
        b21_3.invoke()
    if c21_3=='1' and b21_3var.get()==0:
        b21_3.invoke()
    if c21_4=='0' and b21_4var.get()==1:
        b21_4.invoke()
    if c21_4=='1' and b21_4var.get()==0:
        b21_4.invoke()
    if c21_5=='0' and b21_5var.get()==1:
        b21_5.invoke()
    if c21_5=='1' and b21_5var.get()==0:
        b21_5.invoke()
    if c21_7=='0' and b21_7var.get()==1:
        b21_7.invoke()
    if c21_7=='1' and b21_7var.get()==0:
        b21_7.invoke()

    if c22_0=='0' and b22_0var.get()==1:
        b22_0.invoke()
    if c22_0=='1' and b22_0var.get()==0:
        b22_0.invoke()
    if c22_1=='0' and b22_1var.get()==1:
        b22_1.invoke()
    if c22_1=='1' and b22_1var.get()==0:
        b22_1.invoke()
    if c22_2=='0' and b22_2var.get()==1:
        b22_2.invoke()
    if c22_2=='1' and b22_2var.get()==0:
        b22_2.invoke()
    if c22_3=='0' and b22_3var.get()==1:
        b22_3.invoke()
    if c22_3=='1' and b22_3var.get()==0:
        b22_3.invoke()
    if c22_4=='0' and b22_4var.get()==1:
        b22_4.invoke()
    if c22_4=='1' and b22_4var.get()==0:
        b22_4.invoke()
    if c22_5=='0' and b22_5var.get()==1:
        b22_5.invoke()
    if c22_5=='1' and b22_5var.get()==0:
        b22_5.invoke()
    if c22_7=='0' and b22_7var.get()==1:
        b22_7.invoke()
    if c22_7=='1' and b22_7var.get()==0:
        b22_7.invoke()

    if c23_0=='0' and b23_0var.get()==1:
        b23_0.invoke()
    if c23_0=='1' and b23_0var.get()==0:
        b23_0.invoke()
    if c23_1=='0' and b23_1var.get()==1:
        b23_1.invoke()
    if c23_1=='1' and b23_1var.get()==0:
        b23_1.invoke()
    if c23_2=='0' and b23_2var.get()==1:
        b23_2.invoke()
    if c23_2=='1' and b23_2var.get()==0:
        b23_2.invoke()
    if c23_3=='0' and b23_3var.get()==1:
        b23_3.invoke()
    if c23_3=='1' and b23_3var.get()==0:
        b23_3.invoke()
    if c23_4=='0' and b23_4var.get()==1:
        b23_4.invoke()
    if c23_4=='1' and b23_4var.get()==0:
        b23_4.invoke()
    if c23_5=='0' and b23_5var.get()==1:
        b23_5.invoke()
    if c23_5=='1' and b23_5var.get()==0:
        b23_5.invoke()
    if c23_7=='0' and b23_7var.get()==1:
        b23_7.invoke()
    if c23_7=='1' and b23_7var.get()==0:
        b23_7.invoke()

    if c24_0=='0' and b24_0var.get()==1:
        b24_0.invoke()
    if c24_0=='1' and b24_0var.get()==0:
        b24_0.invoke()
    if c24_1=='0' and b24_1var.get()==1:
        b24_1.invoke()
    if c24_1=='1' and b24_1var.get()==0:
        b24_1.invoke()
    if c24_2=='0' and b24_2var.get()==1:
        b24_2.invoke()
    if c24_2=='1' and b24_2var.get()==0:
        b24_2.invoke()
    if c24_3=='0' and b24_3var.get()==1:
        b24_3.invoke()
    if c24_3=='1' and b24_3var.get()==0:
        b24_3.invoke()
    if c24_4=='0' and b24_4var.get()==1:
        b24_4.invoke()
    if c24_4=='1' and b24_4var.get()==0:
        b24_4.invoke()
    if c24_5=='0' and b24_5var.get()==1:
        b24_5.invoke()
    if c24_5=='1' and b24_5var.get()==0:
        b24_5.invoke()
    if c24_7=='0' and b24_7var.get()==1:
        b24_7.invoke()
    if c24_7=='1' and b24_7var.get()==0:
        b24_7.invoke()

    if c25_0=='0' and b25_0var.get()==1:
        b25_0.invoke()
    if c25_0=='1' and b25_0var.get()==0:
        b25_0.invoke()
    if c25_1=='0' and b25_1var.get()==1:
        b25_1.invoke()
    if c25_1=='1' and b25_1var.get()==0:
        b25_1.invoke()
    if c25_2=='0' and b25_2var.get()==1:
        b25_2.invoke()
    if c25_2=='1' and b25_2var.get()==0:
        b25_2.invoke()
    if c25_3=='0' and b25_3var.get()==1:
        b25_3.invoke()
    if c25_3=='1' and b25_3var.get()==0:
        b25_3.invoke()
    if c25_4=='0' and b25_4var.get()==1:
        b25_4.invoke()
    if c25_4=='1' and b25_4var.get()==0:
        b25_4.invoke()
    if c25_5=='0' and b25_5var.get()==1:
        b25_5.invoke()
    if c25_5=='1' and b25_5var.get()==0:
        b25_5.invoke()
    if c25_7=='0' and b25_7var.get()==1:
        b25_7.invoke()
    if c25_7=='1' and b25_7var.get()==0:
        b25_7.invoke()

    if c26_0=='0' and b26_0var.get()==1:
        b26_0.invoke()
    if c26_0=='1' and b26_0var.get()==0:
        b26_0.invoke()
    if c26_1=='0' and b26_1var.get()==1:
        b26_1.invoke()
    if c26_1=='1' and b26_1var.get()==0:
        b26_1.invoke()
    if c26_2=='0' and b26_2var.get()==1:
        b26_2.invoke()
    if c26_2=='1' and b26_2var.get()==0:
        b26_2.invoke()
    if c26_3=='0' and b26_3var.get()==1:
        b26_3.invoke()
    if c26_3=='1' and b26_3var.get()==0:
        b26_3.invoke()
    if c26_4=='0' and b26_4var.get()==1:
        b26_4.invoke()
    if c26_4=='1' and b26_4var.get()==0:
        b26_4.invoke()
    if c26_5=='0' and b26_5var.get()==1:
        b26_5.invoke()
    if c26_5=='1' and b26_5var.get()==0:
        b26_5.invoke()
    if c26_7=='0' and b26_7var.get()==1:
        b26_7.invoke()
    if c26_7=='1' and b26_7var.get()==0:
        b26_7.invoke()

    if c27_0=='0' and b27_0var.get()==1:
        b27_0.invoke()
    if c27_0=='1' and b27_0var.get()==0:
        b27_0.invoke()
    if c27_1=='0' and b27_1var.get()==1:
        b27_1.invoke()
    if c27_1=='1' and b27_1var.get()==0:
        b27_1.invoke()
    if c27_2=='0' and b27_2var.get()==1:
        b27_2.invoke()
    if c27_2=='1' and b27_2var.get()==0:
        b27_2.invoke()
    if c27_3=='0' and b27_3var.get()==1:
        b27_3.invoke()
    if c27_3=='1' and b27_3var.get()==0:
        b27_3.invoke()
    if c27_4=='0' and b27_4var.get()==1:
        b27_4.invoke()
    if c27_4=='1' and b27_4var.get()==0:
        b27_4.invoke()
    if c27_5=='0' and b27_5var.get()==1:
        b27_5.invoke()
    if c27_5=='1' and b27_5var.get()==0:
        b27_5.invoke()
    if c27_7=='0' and b27_7var.get()==1:
        b27_7.invoke()
    if c27_7=='1' and b27_7var.get()==0:
        b27_7.invoke()

    if c28_0=='0' and b28_0var.get()==1:
        b28_0.invoke()
    if c28_0=='1' and b28_0var.get()==0:
        b28_0.invoke()
    if c28_1=='0' and b28_1var.get()==1:
        b28_1.invoke()
    if c28_1=='1' and b28_1var.get()==0:
        b28_1.invoke()
    if c28_2=='0' and b28_2var.get()==1:
        b28_2.invoke()
    if c28_2=='1' and b28_2var.get()==0:
        b28_2.invoke()
    if c28_3=='0' and b28_3var.get()==1:
        b28_3.invoke()
    if c28_3=='1' and b28_3var.get()==0:
        b28_3.invoke()
    if c28_4=='0' and b28_4var.get()==1:
        b28_4.invoke()
    if c28_4=='1' and b28_4var.get()==0:
        b28_4.invoke()
    if c28_5=='0' and b28_5var.get()==1:
        b28_5.invoke()
    if c28_5=='1' and b28_5var.get()==0:
        b28_5.invoke()
    if c28_7=='0' and b28_7var.get()==1:
        b28_7.invoke()
    if c28_7=='1' and b28_7var.get()==0:
        b28_7.invoke()

    if c29_0=='0' and b29_0var.get()==1:
        b29_0.invoke()
    if c29_0=='1' and b29_0var.get()==0:
        b29_0.invoke()
    if c29_1=='0' and b29_1var.get()==1:
        b29_1.invoke()
    if c29_1=='1' and b29_1var.get()==0:
        b29_1.invoke()
    if c29_2=='0' and b29_2var.get()==1:
        b29_2.invoke()
    if c29_2=='1' and b29_2var.get()==0:
        b29_2.invoke()
    if c29_3=='0' and b29_3var.get()==1:
        b29_3.invoke()
    if c29_3=='1' and b29_3var.get()==0:
        b29_3.invoke()
    if c29_4=='0' and b29_4var.get()==1:
        b29_4.invoke()
    if c29_4=='1' and b29_4var.get()==0:
        b29_4.invoke()
    if c29_5=='0' and b29_5var.get()==1:
        b29_5.invoke()
    if c29_5=='1' and b29_5var.get()==0:
        b29_5.invoke()
    if c29_7=='0' and b29_7var.get()==1:
        b29_7.invoke()
    if c29_7=='1' and b29_7var.get()==0:
        b29_7.invoke()

    if c30_0=='0' and b30_0var.get()==1:
        b30_0.invoke()
    if c30_0=='1' and b30_0var.get()==0:
        b30_0.invoke()
    if c30_1=='0' and b30_1var.get()==1:
        b30_1.invoke()
    if c30_1=='1' and b30_1var.get()==0:
        b30_1.invoke()
    if c30_2=='0' and b30_2var.get()==1:
        b30_2.invoke()
    if c30_2=='1' and b30_2var.get()==0:
        b30_2.invoke()
    if c30_3=='0' and b30_3var.get()==1:
        b30_3.invoke()
    if c30_3=='1' and b30_3var.get()==0:
        b30_3.invoke()
    if c30_4=='0' and b30_4var.get()==1:
        b30_4.invoke()
    if c30_4=='1' and b30_4var.get()==0:
        b30_4.invoke()
    if c30_5=='0' and b30_5var.get()==1:
        b30_5.invoke()
    if c30_5=='1' and b30_5var.get()==0:
        b30_5.invoke()
    if c30_7=='0' and b30_7var.get()==1:
        b30_7.invoke()
    if c30_7=='1' and b30_7var.get()==0:
        b30_7.invoke()

    if c31_0=='0' and b31_0var.get()==1:
        b31_0.invoke()
    if c31_0=='1' and b31_0var.get()==0:
        b31_0.invoke()
    if c31_1=='0' and b31_1var.get()==1:
        b31_1.invoke()
    if c31_1=='1' and b31_1var.get()==0:
        b31_1.invoke()
    if c31_2=='0' and b31_2var.get()==1:
        b31_2.invoke()
    if c31_2=='1' and b31_2var.get()==0:
        b31_2.invoke()
    if c31_3=='0' and b31_3var.get()==1:
        b31_3.invoke()
    if c31_3=='1' and b31_3var.get()==0:
        b31_3.invoke()
    if c31_4=='0' and b31_4var.get()==1:
        b31_4.invoke()
    if c31_4=='1' and b31_4var.get()==0:
        b31_4.invoke()
    if c31_5=='0' and b31_5var.get()==1:
        b31_5.invoke()
    if c31_5=='1' and b31_5var.get()==0:
        b31_5.invoke()
    if c31_7=='0' and b31_7var.get()==1:
        b31_7.invoke()
    if c31_7=='1' and b31_7var.get()==0:
        b31_7.invoke()

    if c32_0=='0' and b32_0var.get()==1:
        b32_0.invoke()
    if c32_0=='1' and b32_0var.get()==0:
        b32_0.invoke()
    if c32_1=='0' and b32_1var.get()==1:
        b32_1.invoke()
    if c32_1=='1' and b32_1var.get()==0:
        b32_1.invoke()
    if c32_2=='0' and b32_2var.get()==1:
        b32_2.invoke()
    if c32_2=='1' and b32_2var.get()==0:
        b32_2.invoke()
    if c32_3=='0' and b32_3var.get()==1:
        b32_3.invoke()
    if c32_3=='1' and b32_3var.get()==0:
        b32_3.invoke()
    if c32_4=='0' and b32_4var.get()==1:
        b32_4.invoke()
    if c32_4=='1' and b32_4var.get()==0:
        b32_4.invoke()
    if c32_5=='0' and b32_5var.get()==1:
        b32_5.invoke()
    if c32_5=='1' and b32_5var.get()==0:
        b32_5.invoke()
    if c32_7=='0' and b32_7var.get()==1:
        b32_7.invoke()
    if c32_7=='1' and b32_7var.get()==0:
        b32_7.invoke()

    if c33_0=='0' and b33_0var.get()==1:
        b33_0.invoke()
    if c33_0=='1' and b33_0var.get()==0:
        b33_0.invoke()
    if c33_1=='0' and b33_1var.get()==1:
        b33_1.invoke()
    if c33_1=='1' and b33_1var.get()==0:
        b33_1.invoke()
    if c33_2=='0' and b33_2var.get()==1:
        b33_2.invoke()
    if c33_2=='1' and b33_2var.get()==0:
        b33_2.invoke()
    if c33_3=='0' and b33_3var.get()==1:
        b33_3.invoke()
    if c33_3=='1' and b33_3var.get()==0:
        b33_3.invoke()
    if c33_4=='0' and b33_4var.get()==1:
        b33_4.invoke()
    if c33_4=='1' and b33_4var.get()==0:
        b33_4.invoke()
    if c33_5=='0' and b33_5var.get()==1:
        b33_5.invoke()
    if c33_5=='1' and b33_5var.get()==0:
        b33_5.invoke()
    if c33_7=='0' and b33_7var.get()==1:
        b33_7.invoke()
    if c33_7=='1' and b33_7var.get()==0:
        b33_7.invoke()

    if c34_0=='0' and b34_0var.get()==1:
        b34_0.invoke()
    if c34_0=='1' and b34_0var.get()==0:
        b34_0.invoke()
    if c34_1=='0' and b34_1var.get()==1:
        b34_1.invoke()
    if c34_1=='1' and b34_1var.get()==0:
        b34_1.invoke()
    if c34_2=='0' and b34_2var.get()==1:
        b34_2.invoke()
    if c34_2=='1' and b34_2var.get()==0:
        b34_2.invoke()
    if c34_3=='0' and b34_3var.get()==1:
        b34_3.invoke()
    if c34_3=='1' and b34_3var.get()==0:
        b34_3.invoke()
    if c34_4=='0' and b34_4var.get()==1:
        b34_4.invoke()
    if c34_4=='1' and b34_4var.get()==0:
        b34_4.invoke()
    if c34_5=='0' and b34_5var.get()==1:
        b34_5.invoke()
    if c34_5=='1' and b34_5var.get()==0:
        b34_5.invoke()
    if c34_7=='0' and b34_7var.get()==1:
        b34_7.invoke()
    if c34_7=='1' and b34_7var.get()==0:
        b34_7.invoke()

    if c35_0=='0' and b35_0var.get()==1:
        b35_0.invoke()
    if c35_0=='1' and b35_0var.get()==0:
        b35_0.invoke()
    if c35_1=='0' and b35_1var.get()==1:
        b35_1.invoke()
    if c35_1=='1' and b35_1var.get()==0:
        b35_1.invoke()
    if c35_2=='0' and b35_2var.get()==1:
        b35_2.invoke()
    if c35_2=='1' and b35_2var.get()==0:
        b35_2.invoke()
    if c35_3=='0' and b35_3var.get()==1:
        b35_3.invoke()
    if c35_3=='1' and b35_3var.get()==0:
        b35_3.invoke()
    if c35_4=='0' and b35_4var.get()==1:
        b35_4.invoke()
    if c35_4=='1' and b35_4var.get()==0:
        b35_4.invoke()
    if c35_5=='0' and b35_5var.get()==1:
        b35_5.invoke()
    if c35_5=='1' and b35_5var.get()==0:
        b35_5.invoke()
    if c35_7=='0' and b35_7var.get()==1:
        b35_7.invoke()
    if c35_7=='1' and b35_7var.get()==0:
        b35_7.invoke()

    if c36_0=='0' and b36_0var.get()==1:
        b36_0.invoke()
    if c36_0=='1' and b36_0var.get()==0:
        b36_0.invoke()
    if c36_1=='0' and b36_1var.get()==1:
        b36_1.invoke()
    if c36_1=='1' and b36_1var.get()==0:
        b36_1.invoke()
    if c36_2=='0' and b36_2var.get()==1:
        b36_2.invoke()
    if c36_2=='1' and b36_2var.get()==0:
        b36_2.invoke()
    if c36_3=='0' and b36_3var.get()==1:
        b36_3.invoke()
    if c36_3=='1' and b36_3var.get()==0:
        b36_3.invoke()
    if c36_4=='0' and b36_4var.get()==1:
        b36_4.invoke()
    if c36_4=='1' and b36_4var.get()==0:
        b36_4.invoke()
    if c36_5=='0' and b36_5var.get()==1:
        b36_5.invoke()
    if c36_5=='1' and b36_5var.get()==0:
        b36_5.invoke()
    if c36_7=='0' and b36_7var.get()==1:
        b36_7.invoke()
    if c36_7=='1' and b36_7var.get()==0:
        b36_7.invoke()

    if c37_0=='0' and b37_0var.get()==1:
        b37_0.invoke()
    if c37_0=='1' and b37_0var.get()==0:
        b37_0.invoke()
    if c37_1=='0' and b37_1var.get()==1:
        b37_1.invoke()
    if c37_1=='1' and b37_1var.get()==0:
        b37_1.invoke()
    if c37_2=='0' and b37_2var.get()==1:
        b37_2.invoke()
    if c37_2=='1' and b37_2var.get()==0:
        b37_2.invoke()
    if c37_3=='0' and b37_3var.get()==1:
        b37_3.invoke()
    if c37_3=='1' and b37_3var.get()==0:
        b37_3.invoke()
    if c37_4=='0' and b37_4var.get()==1:
        b37_4.invoke()
    if c37_4=='1' and b37_4var.get()==0:
        b37_4.invoke()
    if c37_5=='0' and b37_5var.get()==1:
        b37_5.invoke()
    if c37_5=='1' and b37_5var.get()==0:
        b37_5.invoke()
    if c37_7=='0' and b37_7var.get()==1:
        b37_7.invoke()
    if c37_7=='1' and b37_7var.get()==0:
        b37_7.invoke()

    if c38_0=='0' and b38_0var.get()==1:
        b38_0.invoke()
    if c38_0=='1' and b38_0var.get()==0:
        b38_0.invoke()
    if c38_1=='0' and b38_1var.get()==1:
        b38_1.invoke()
    if c38_1=='1' and b38_1var.get()==0:
        b38_1.invoke()
    if c38_2=='0' and b38_2var.get()==1:
        b38_2.invoke()
    if c38_2=='1' and b38_2var.get()==0:
        b38_2.invoke()
    if c38_3=='0' and b38_3var.get()==1:
        b38_3.invoke()
    if c38_3=='1' and b38_3var.get()==0:
        b38_3.invoke()
    if c38_4=='0' and b38_4var.get()==1:
        b38_4.invoke()
    if c38_4=='1' and b38_4var.get()==0:
        b38_4.invoke()
    if c38_5=='0' and b38_5var.get()==1:
        b38_5.invoke()
    if c38_5=='1' and b38_5var.get()==0:
        b38_5.invoke()
    if c38_7=='0' and b38_7var.get()==1:
        b38_7.invoke()
    if c38_7=='1' and b38_7var.get()==0:
        b38_7.invoke()

    if c39_0=='0' and b39_0var.get()==1:
        b39_0.invoke()
    if c39_0=='1' and b39_0var.get()==0:
        b39_0.invoke()
    if c39_1=='0' and b39_1var.get()==1:
        b39_1.invoke()
    if c39_1=='1' and b39_1var.get()==0:
        b39_1.invoke()
    if c39_2=='0' and b39_2var.get()==1:
        b39_2.invoke()
    if c39_2=='1' and b39_2var.get()==0:
        b39_2.invoke()
    if c39_3=='0' and b39_3var.get()==1:
        b39_3.invoke()
    if c39_3=='1' and b39_3var.get()==0:
        b39_3.invoke()
    if c39_4=='0' and b39_4var.get()==1:
        b39_4.invoke()
    if c39_4=='1' and b39_4var.get()==0:
        b39_4.invoke()
    if c39_5=='0' and b39_5var.get()==1:
        b39_5.invoke()
    if c39_5=='1' and b39_5var.get()==0:
        b39_5.invoke()
    if c39_7=='0' and b39_7var.get()==1:
        b39_7.invoke()
    if c39_7=='1' and b39_7var.get()==0:
        b39_7.invoke()

    if c40_0=='0' and b40_0var.get()==1:
        b40_0.invoke()
    if c40_0=='1' and b40_0var.get()==0:
        b40_0.invoke()
    if c40_1=='0' and b40_1var.get()==1:
        b40_1.invoke()
    if c40_1=='1' and b40_1var.get()==0:
        b40_1.invoke()
    if c40_2=='0' and b40_2var.get()==1:
        b40_2.invoke()
    if c40_2=='1' and b40_2var.get()==0:
        b40_2.invoke()
    if c40_3=='0' and b40_3var.get()==1:
        b40_3.invoke()
    if c40_3=='1' and b40_3var.get()==0:
        b40_3.invoke()
    if c40_4=='0' and b40_4var.get()==1:
        b40_4.invoke()
    if c40_4=='1' and b40_4var.get()==0:
        b40_4.invoke()
    if c40_5=='0' and b40_5var.get()==1:
        b40_5.invoke()
    if c40_5=='1' and b40_5var.get()==0:
        b40_5.invoke()
    if c40_7=='0' and b40_7var.get()==1:
        b40_7.invoke()
    if c40_7=='1' and b40_7var.get()==0:
        b40_7.invoke()

    if c41_0=='0' and b41_0var.get()==1:
        b41_0.invoke()
    if c41_0=='1' and b41_0var.get()==0:
        b41_0.invoke()
    if c41_1=='0' and b41_1var.get()==1:
        b41_1.invoke()
    if c41_1=='1' and b41_1var.get()==0:
        b41_1.invoke()
    if c41_2=='0' and b41_2var.get()==1:
        b41_2.invoke()
    if c41_2=='1' and b41_2var.get()==0:
        b41_2.invoke()
    if c41_3=='0' and b41_3var.get()==1:
        b41_3.invoke()
    if c41_3=='1' and b41_3var.get()==0:
        b41_3.invoke()
    if c41_4=='0' and b41_4var.get()==1:
        b41_4.invoke()
    if c41_4=='1' and b41_4var.get()==0:
        b41_4.invoke()
    if c41_5=='0' and b41_5var.get()==1:
        b41_5.invoke()
    if c41_5=='1' and b41_5var.get()==0:
        b41_5.invoke()
    if c41_7=='0' and b41_7var.get()==1:
        b41_7.invoke()
    if c41_7=='1' and b41_7var.get()==0:
        b41_7.invoke()

    if c42_0=='0' and b42_0var.get()==1:
        b42_0.invoke()
    if c42_0=='1' and b42_0var.get()==0:
        b42_0.invoke()
    if c42_1=='0' and b42_1var.get()==1:
        b42_1.invoke()
    if c42_1=='1' and b42_1var.get()==0:
        b42_1.invoke()
    if c42_2=='0' and b42_2var.get()==1:
        b42_2.invoke()
    if c42_2=='1' and b42_2var.get()==0:
        b42_2.invoke()
    if c42_3=='0' and b42_3var.get()==1:
        b42_3.invoke()
    if c42_3=='1' and b42_3var.get()==0:
        b42_3.invoke()
    if c42_4=='0' and b42_4var.get()==1:
        b42_4.invoke()
    if c42_4=='1' and b42_4var.get()==0:
        b42_4.invoke()
    if c42_5=='0' and b42_5var.get()==1:
        b42_5.invoke()
    if c42_5=='1' and b42_5var.get()==0:
        b42_5.invoke()
    if c42_7=='0' and b42_7var.get()==1:
        b42_7.invoke()
    if c42_7=='1' and b42_7var.get()==0:
        b42_7.invoke()

    if c43_0=='0' and b43_0var.get()==1:
        b43_0.invoke()
    if c43_0=='1' and b43_0var.get()==0:
        b43_0.invoke()
    if c43_1=='0' and b43_1var.get()==1:
        b43_1.invoke()
    if c43_1=='1' and b43_1var.get()==0:
        b43_1.invoke()
    if c43_2=='0' and b43_2var.get()==1:
        b43_2.invoke()
    if c43_2=='1' and b43_2var.get()==0:
        b43_2.invoke()
    if c43_3=='0' and b43_3var.get()==1:
        b43_3.invoke()
    if c43_3=='1' and b43_3var.get()==0:
        b43_3.invoke()
    if c43_4=='0' and b43_4var.get()==1:
        b43_4.invoke()
    if c43_4=='1' and b43_4var.get()==0:
        b43_4.invoke()
    if c43_5=='0' and b43_5var.get()==1:
        b43_5.invoke()
    if c43_5=='1' and b43_5var.get()==0:
        b43_5.invoke()
    if c43_7=='0' and b43_7var.get()==1:
        b43_7.invoke()
    if c43_7=='1' and b43_7var.get()==0:
        b43_7.invoke()

    if c44_0=='0' and b44_0var.get()==1:
        b44_0.invoke()
    if c44_0=='1' and b44_0var.get()==0:
        b44_0.invoke()
    if c44_1=='0' and b44_1var.get()==1:
        b44_1.invoke()
    if c44_1=='1' and b44_1var.get()==0:
        b44_1.invoke()
    if c44_2=='0' and b44_2var.get()==1:
        b44_2.invoke()
    if c44_2=='1' and b44_2var.get()==0:
        b44_2.invoke()
    if c44_3=='0' and b44_3var.get()==1:
        b44_3.invoke()
    if c44_3=='1' and b44_3var.get()==0:
        b44_3.invoke()
    if c44_4=='0' and b44_4var.get()==1:
        b44_4.invoke()
    if c44_4=='1' and b44_4var.get()==0:
        b44_4.invoke()
    if c44_5=='0' and b44_5var.get()==1:
        b44_5.invoke()
    if c44_5=='1' and b44_5var.get()==0:
        b44_5.invoke()
    if c44_7=='0' and b44_7var.get()==1:
        b44_7.invoke()
    if c44_7=='1' and b44_7var.get()==0:
        b44_7.invoke()

    if c45_0=='0' and b45_0var.get()==1:
        b45_0.invoke()
    if c45_0=='1' and b45_0var.get()==0:
        b45_0.invoke()
    if c45_1=='0' and b45_1var.get()==1:
        b45_1.invoke()
    if c45_1=='1' and b45_1var.get()==0:
        b45_1.invoke()
    if c45_2=='0' and b45_2var.get()==1:
        b45_2.invoke()
    if c45_2=='1' and b45_2var.get()==0:
        b45_2.invoke()
    if c45_3=='0' and b45_3var.get()==1:
        b45_3.invoke()
    if c45_3=='1' and b45_3var.get()==0:
        b45_3.invoke()
    if c45_4=='0' and b45_4var.get()==1:
        b45_4.invoke()
    if c45_4=='1' and b45_4var.get()==0:
        b45_4.invoke()
    if c45_5=='0' and b45_5var.get()==1:
        b45_5.invoke()
    if c45_5=='1' and b45_5var.get()==0:
        b45_5.invoke()
    if c45_7=='0' and b45_7var.get()==1:
        b45_7.invoke()
    if c45_7=='1' and b45_7var.get()==0:
        b45_7.invoke()

    if c46_0=='0' and b46_0var.get()==1:
        b46_0.invoke()
    if c46_0=='1' and b46_0var.get()==0:
        b46_0.invoke()
    if c46_1=='0' and b46_1var.get()==1:
        b46_1.invoke()
    if c46_1=='1' and b46_1var.get()==0:
        b46_1.invoke()
    if c46_2=='0' and b46_2var.get()==1:
        b46_2.invoke()
    if c46_2=='1' and b46_2var.get()==0:
        b46_2.invoke()
    if c46_3=='0' and b46_3var.get()==1:
        b46_3.invoke()
    if c46_3=='1' and b46_3var.get()==0:
        b46_3.invoke()
    if c46_4=='0' and b46_4var.get()==1:
        b46_4.invoke()
    if c46_4=='1' and b46_4var.get()==0:
        b46_4.invoke()
    if c46_5=='0' and b46_5var.get()==1:
        b46_5.invoke()
    if c46_5=='1' and b46_5var.get()==0:
        b46_5.invoke()
    if c46_7=='0' and b46_7var.get()==1:
        b46_7.invoke()
    if c46_7=='1' and b46_7var.get()==0:
        b46_7.invoke()

    if c47_0=='0' and b47_0var.get()==1:
        b47_0.invoke()
    if c47_0=='1' and b47_0var.get()==0:
        b47_0.invoke()
    if c47_1=='0' and b47_1var.get()==1:
        b47_1.invoke()
    if c47_1=='1' and b47_1var.get()==0:
        b47_1.invoke()
    if c47_2=='0' and b47_2var.get()==1:
        b47_2.invoke()
    if c47_2=='1' and b47_2var.get()==0:
        b47_2.invoke()
    if c47_3=='0' and b47_3var.get()==1:
        b47_3.invoke()
    if c47_3=='1' and b47_3var.get()==0:
        b47_3.invoke()
    if c47_4=='0' and b47_4var.get()==1:
        b47_4.invoke()
    if c47_4=='1' and b47_4var.get()==0:
        b47_4.invoke()
    if c47_5=='0' and b47_5var.get()==1:
        b47_5.invoke()
    if c47_5=='1' and b47_5var.get()==0:
        b47_5.invoke()
    if c47_7=='0' and b47_7var.get()==1:
        b47_7.invoke()
    if c47_7=='1' and b47_7var.get()==0:
        b47_7.invoke()

    if c48_0=='0' and b48_0var.get()==1:
        b48_0.invoke()
    if c48_0=='1' and b48_0var.get()==0:
        b48_0.invoke()
    if c48_1=='0' and b48_1var.get()==1:
        b48_1.invoke()
    if c48_1=='1' and b48_1var.get()==0:
        b48_1.invoke()
    if c48_2=='0' and b48_2var.get()==1:
        b48_2.invoke()
    if c48_2=='1' and b48_2var.get()==0:
        b48_2.invoke()
    if c48_3=='0' and b48_3var.get()==1:
        b48_3.invoke()
    if c48_3=='1' and b48_3var.get()==0:
        b48_3.invoke()
    if c48_4=='0' and b48_4var.get()==1:
        b48_4.invoke()
    if c48_4=='1' and b48_4var.get()==0:
        b48_4.invoke()
    if c48_5=='0' and b48_5var.get()==1:
        b48_5.invoke()
    if c48_5=='1' and b48_5var.get()==0:
        b48_5.invoke()
    if c48_7=='0' and b48_7var.get()==1:
        b48_7.invoke()
    if c48_7=='1' and b48_7var.get()==0:
        b48_7.invoke()

    if c49_0=='0' and b49_0var.get()==1:
        b49_0.invoke()
    if c49_0=='1' and b49_0var.get()==0:
        b49_0.invoke()
    if c49_1=='0' and b49_1var.get()==1:
        b49_1.invoke()
    if c49_1=='1' and b49_1var.get()==0:
        b49_1.invoke()
    if c49_2=='0' and b49_2var.get()==1:
        b49_2.invoke()
    if c49_2=='1' and b49_2var.get()==0:
        b49_2.invoke()
    if c49_3=='0' and b49_3var.get()==1:
        b49_3.invoke()
    if c49_3=='1' and b49_3var.get()==0:
        b49_3.invoke()
    if c49_4=='0' and b49_4var.get()==1:
        b49_4.invoke()
    if c49_4=='1' and b49_4var.get()==0:
        b49_4.invoke()
    if c49_5=='0' and b49_5var.get()==1:
        b49_5.invoke()
    if c49_5=='1' and b49_5var.get()==0:
        b49_5.invoke()
    if c49_7=='0' and b49_7var.get()==1:
        b49_7.invoke()
    if c49_7=='1' and b49_7var.get()==0:
        b49_7.invoke()

    if c50_0=='0' and b50_0var.get()==1:
        b50_0.invoke()
    if c50_0=='1' and b50_0var.get()==0:
        b50_0.invoke()
    if c50_1=='0' and b50_1var.get()==1:
        b50_1.invoke()
    if c50_1=='1' and b50_1var.get()==0:
        b50_1.invoke()
    if c50_2=='0' and b50_2var.get()==1:
        b50_2.invoke()
    if c50_2=='1' and b50_2var.get()==0:
        b50_2.invoke()
    if c50_3=='0' and b50_3var.get()==1:
        b50_3.invoke()
    if c50_3=='1' and b50_3var.get()==0:
        b50_3.invoke()
    if c50_4=='0' and b50_4var.get()==1:
        b50_4.invoke()
    if c50_4=='1' and b50_4var.get()==0:
        b50_4.invoke()
    if c50_5=='0' and b50_5var.get()==1:
        b50_5.invoke()
    if c50_5=='1' and b50_5var.get()==0:
        b50_5.invoke()
    if c50_7=='0' and b50_7var.get()==1:
        b50_7.invoke()
    if c50_7=='1' and b50_7var.get()==0:
        b50_7.invoke()

    if c51_0=='0' and b51_0var.get()==1:
        b51_0.invoke()
    if c51_0=='1' and b51_0var.get()==0:
        b51_0.invoke()
    if c51_1=='0' and b51_1var.get()==1:
        b51_1.invoke()
    if c51_1=='1' and b51_1var.get()==0:
        b51_1.invoke()
    if c51_2=='0' and b51_2var.get()==1:
        b51_2.invoke()
    if c51_2=='1' and b51_2var.get()==0:
        b51_2.invoke()
    if c51_3=='0' and b51_3var.get()==1:
        b51_3.invoke()
    if c51_3=='1' and b51_3var.get()==0:
        b51_3.invoke()
    if c51_4=='0' and b51_4var.get()==1:
        b51_4.invoke()
    if c51_4=='1' and b51_4var.get()==0:
        b51_4.invoke()
    if c51_5=='0' and b51_5var.get()==1:
        b51_5.invoke()
    if c51_5=='1' and b51_5var.get()==0:
        b51_5.invoke()
    if c51_7=='0' and b51_7var.get()==1:
        b51_7.invoke()
    if c51_7=='1' and b51_7var.get()==0:
        b51_7.invoke()

    if c52_0=='0' and b52_0var.get()==1:
        b52_0.invoke()
    if c52_0=='1' and b52_0var.get()==0:
        b52_0.invoke()
    if c52_1=='0' and b52_1var.get()==1:
        b52_1.invoke()
    if c52_1=='1' and b52_1var.get()==0:
        b52_1.invoke()
    if c52_2=='0' and b52_2var.get()==1:
        b52_2.invoke()
    if c52_2=='1' and b52_2var.get()==0:
        b52_2.invoke()
    if c52_3=='0' and b52_3var.get()==1:
        b52_3.invoke()
    if c52_3=='1' and b52_3var.get()==0:
        b52_3.invoke()
    if c52_4=='0' and b52_4var.get()==1:
        b52_4.invoke()
    if c52_4=='1' and b52_4var.get()==0:
        b52_4.invoke()
    if c52_5=='0' and b52_5var.get()==1:
        b52_5.invoke()
    if c52_5=='1' and b52_5var.get()==0:
        b52_5.invoke()
    if c52_7=='0' and b52_7var.get()==1:
        b52_7.invoke()
    if c52_7=='1' and b52_7var.get()==0:
        b52_7.invoke()

    if c53_0=='0' and b53_0var.get()==1:
        b53_0.invoke()
    if c53_0=='1' and b53_0var.get()==0:
        b53_0.invoke()
    if c53_1=='0' and b53_1var.get()==1:
        b53_1.invoke()
    if c53_1=='1' and b53_1var.get()==0:
        b53_1.invoke()
    if c53_2=='0' and b53_2var.get()==1:
        b53_2.invoke()
    if c53_2=='1' and b53_2var.get()==0:
        b53_2.invoke()
    if c53_3=='0' and b53_3var.get()==1:
        b53_3.invoke()
    if c53_3=='1' and b53_3var.get()==0:
        b53_3.invoke()
    if c53_4=='0' and b53_4var.get()==1:
        b53_4.invoke()
    if c53_4=='1' and b53_4var.get()==0:
        b53_4.invoke()
    if c53_5=='0' and b53_5var.get()==1:
        b53_5.invoke()
    if c53_5=='1' and b53_5var.get()==0:
        b53_5.invoke()
    if c53_7=='0' and b53_7var.get()==1:
        b53_7.invoke()
    if c53_7=='1' and b53_7var.get()==0:
        b53_7.invoke()

    if c54_0=='0' and b54_0var.get()==1:
        b54_0.invoke()
    if c54_0=='1' and b54_0var.get()==0:
        b54_0.invoke()
    if c54_1=='0' and b54_1var.get()==1:
        b54_1.invoke()
    if c54_1=='1' and b54_1var.get()==0:
        b54_1.invoke()
    if c54_2=='0' and b54_2var.get()==1:
        b54_2.invoke()
    if c54_2=='1' and b54_2var.get()==0:
        b54_2.invoke()
    if c54_3=='0' and b54_3var.get()==1:
        b54_3.invoke()
    if c54_3=='1' and b54_3var.get()==0:
        b54_3.invoke()
    if c54_4=='0' and b54_4var.get()==1:
        b54_4.invoke()
    if c54_4=='1' and b54_4var.get()==0:
        b54_4.invoke()
    if c54_5=='0' and b54_5var.get()==1:
        b54_5.invoke()
    if c54_5=='1' and b54_5var.get()==0:
        b54_5.invoke()
    if c54_7=='0' and b54_7var.get()==1:
        b54_7.invoke()
    if c54_7=='1' and b54_7var.get()==0:
        b54_7.invoke()

    if c55_0=='0' and b55_0var.get()==1:
        b55_0.invoke()
    if c55_0=='1' and b55_0var.get()==0:
        b55_0.invoke()
    if c55_1=='0' and b55_1var.get()==1:
        b55_1.invoke()
    if c55_1=='1' and b55_1var.get()==0:
        b55_1.invoke()
    if c55_2=='0' and b55_2var.get()==1:
        b55_2.invoke()
    if c55_2=='1' and b55_2var.get()==0:
        b55_2.invoke()
    if c55_3=='0' and b55_3var.get()==1:
        b55_3.invoke()
    if c55_3=='1' and b55_3var.get()==0:
        b55_3.invoke()
    if c55_4=='0' and b55_4var.get()==1:
        b55_4.invoke()
    if c55_4=='1' and b55_4var.get()==0:
        b55_4.invoke()
    if c55_5=='0' and b55_5var.get()==1:
        b55_5.invoke()
    if c55_5=='1' and b55_5var.get()==0:
        b55_5.invoke()
    if c55_7=='0' and b55_7var.get()==1:
        b55_7.invoke()
    if c55_7=='1' and b55_7var.get()==0:
        b55_7.invoke()

    if c56_0=='0' and b56_0var.get()==1:
        b56_0.invoke()
    if c56_0=='1' and b56_0var.get()==0:
        b56_0.invoke()
    if c56_1=='0' and b56_1var.get()==1:
        b56_1.invoke()
    if c56_1=='1' and b56_1var.get()==0:
        b56_1.invoke()
    if c56_2=='0' and b56_2var.get()==1:
        b56_2.invoke()
    if c56_2=='1' and b56_2var.get()==0:
        b56_2.invoke()
    if c56_3=='0' and b56_3var.get()==1:
        b56_3.invoke()
    if c56_3=='1' and b56_3var.get()==0:
        b56_3.invoke()
    if c56_4=='0' and b56_4var.get()==1:
        b56_4.invoke()
    if c56_4=='1' and b56_4var.get()==0:
        b56_4.invoke()
    if c56_5=='0' and b56_5var.get()==1:
        b56_5.invoke()
    if c56_5=='1' and b56_5var.get()==0:
        b56_5.invoke()
    if c56_7=='0' and b56_7var.get()==1:
        b56_7.invoke()
    if c56_7=='1' and b56_7var.get()==0:
        b56_7.invoke()

    if c57_0=='0' and b57_0var.get()==1:
        b57_0.invoke()
    if c57_0=='1' and b57_0var.get()==0:
        b57_0.invoke()
    if c57_1=='0' and b57_1var.get()==1:
        b57_1.invoke()
    if c57_1=='1' and b57_1var.get()==0:
        b57_1.invoke()
    if c57_2=='0' and b57_2var.get()==1:
        b57_2.invoke()
    if c57_2=='1' and b57_2var.get()==0:
        b57_2.invoke()
    if c57_3=='0' and b57_3var.get()==1:
        b57_3.invoke()
    if c57_3=='1' and b57_3var.get()==0:
        b57_3.invoke()
    if c57_4=='0' and b57_4var.get()==1:
        b57_4.invoke()
    if c57_4=='1' and b57_4var.get()==0:
        b57_4.invoke()
    if c57_5=='0' and b57_5var.get()==1:
        b57_5.invoke()
    if c57_5=='1' and b57_5var.get()==0:
        b57_5.invoke()
    if c57_7=='0' and b57_7var.get()==1:
        b57_7.invoke()
    if c57_7=='1' and b57_7var.get()==0:
        b57_7.invoke()

    if c58_0=='0' and b58_0var.get()==1:
        b58_0.invoke()
    if c58_0=='1' and b58_0var.get()==0:
        b58_0.invoke()
    if c58_1=='0' and b58_1var.get()==1:
        b58_1.invoke()
    if c58_1=='1' and b58_1var.get()==0:
        b58_1.invoke()
    if c58_2=='0' and b58_2var.get()==1:
        b58_2.invoke()
    if c58_2=='1' and b58_2var.get()==0:
        b58_2.invoke()
    if c58_3=='0' and b58_3var.get()==1:
        b58_3.invoke()
    if c58_3=='1' and b58_3var.get()==0:
        b58_3.invoke()
    if c58_4=='0' and b58_4var.get()==1:
        b58_4.invoke()
    if c58_4=='1' and b58_4var.get()==0:
        b58_4.invoke()
    if c58_5=='0' and b58_5var.get()==1:
        b58_5.invoke()
    if c58_5=='1' and b58_5var.get()==0:
        b58_5.invoke()
    if c58_7=='0' and b58_7var.get()==1:
        b58_7.invoke()
    if c58_7=='1' and b58_7var.get()==0:
        b58_7.invoke()

    if c59_0=='0' and b59_0var.get()==1:
        b59_0.invoke()
    if c59_0=='1' and b59_0var.get()==0:
        b59_0.invoke()
    if c59_1=='0' and b59_1var.get()==1:
        b59_1.invoke()
    if c59_1=='1' and b59_1var.get()==0:
        b59_1.invoke()
    if c59_2=='0' and b59_2var.get()==1:
        b59_2.invoke()
    if c59_2=='1' and b59_2var.get()==0:
        b59_2.invoke()
    if c59_3=='0' and b59_3var.get()==1:
        b59_3.invoke()
    if c59_3=='1' and b59_3var.get()==0:
        b59_3.invoke()
    if c59_4=='0' and b59_4var.get()==1:
        b59_4.invoke()
    if c59_4=='1' and b59_4var.get()==0:
        b59_4.invoke()
    if c59_5=='0' and b59_5var.get()==1:
        b59_5.invoke()
    if c59_5=='1' and b59_5var.get()==0:
        b59_5.invoke()
    if c59_7=='0' and b59_7var.get()==1:
        b59_7.invoke()
    if c59_7=='1' and b59_7var.get()==0:
        b59_7.invoke()

    if c60_0=='0' and b60_0var.get()==1:
        b60_0.invoke()
    if c60_0=='1' and b60_0var.get()==0:
        b60_0.invoke()
    if c60_1=='0' and b60_1var.get()==1:
        b60_1.invoke()
    if c60_1=='1' and b60_1var.get()==0:
        b60_1.invoke()
    if c60_2=='0' and b60_2var.get()==1:
        b60_2.invoke()
    if c60_2=='1' and b60_2var.get()==0:
        b60_2.invoke()
    if c60_3=='0' and b60_3var.get()==1:
        b60_3.invoke()
    if c60_3=='1' and b60_3var.get()==0:
        b60_3.invoke()
    if c60_4=='0' and b60_4var.get()==1:
        b60_4.invoke()
    if c60_4=='1' and b60_4var.get()==0:
        b60_4.invoke()
    if c60_5=='0' and b60_5var.get()==1:
        b60_5.invoke()
    if c60_5=='1' and b60_5var.get()==0:
        b60_5.invoke()
    if c60_7=='0' and b60_7var.get()==1:
        b60_7.invoke()
    if c60_7=='1' and b60_7var.get()==0:
        b60_7.invoke()

    if c61_0=='0' and b61_0var.get()==1:
        b61_0.invoke()
    if c61_0=='1' and b61_0var.get()==0:
        b61_0.invoke()
    if c61_1=='0' and b61_1var.get()==1:
        b61_1.invoke()
    if c61_1=='1' and b61_1var.get()==0:
        b61_1.invoke()
    if c61_2=='0' and b61_2var.get()==1:
        b61_2.invoke()
    if c61_2=='1' and b61_2var.get()==0:
        b61_2.invoke()
    if c61_3=='0' and b61_3var.get()==1:
        b61_3.invoke()
    if c61_3=='1' and b61_3var.get()==0:
        b61_3.invoke()
    if c61_4=='0' and b61_4var.get()==1:
        b61_4.invoke()
    if c61_4=='1' and b61_4var.get()==0:
        b61_4.invoke()
    if c61_5=='0' and b61_5var.get()==1:
        b61_5.invoke()
    if c61_5=='1' and b61_5var.get()==0:
        b61_5.invoke()
    if c61_7=='0' and b61_7var.get()==1:
        b61_7.invoke()
    if c61_7=='1' and b61_7var.get()==0:
        b61_7.invoke()

    if c62_0=='0' and b62_0var.get()==1:
        b62_0.invoke()
    if c62_0=='1' and b62_0var.get()==0:
        b62_0.invoke()
    if c62_1=='0' and b62_1var.get()==1:
        b62_1.invoke()
    if c62_1=='1' and b62_1var.get()==0:
        b62_1.invoke()
    if c62_2=='0' and b62_2var.get()==1:
        b62_2.invoke()
    if c62_2=='1' and b62_2var.get()==0:
        b62_2.invoke()
    if c62_3=='0' and b62_3var.get()==1:
        b62_3.invoke()
    if c62_3=='1' and b62_3var.get()==0:
        b62_3.invoke()
    if c62_4=='0' and b62_4var.get()==1:
        b62_4.invoke()
    if c62_4=='1' and b62_4var.get()==0:
        b62_4.invoke()
    if c62_5=='0' and b62_5var.get()==1:
        b62_5.invoke()
    if c62_5=='1' and b62_5var.get()==0:
        b62_5.invoke()
    if c62_7=='0' and b62_7var.get()==1:
        b62_7.invoke()
    if c62_7=='1' and b62_7var.get()==0:
        b62_7.invoke()

    if c63_0=='0' and b63_0var.get()==1:
        b63_0.invoke()
    if c63_0=='1' and b63_0var.get()==0:
        b63_0.invoke()
    if c63_1=='0' and b63_1var.get()==1:
        b63_1.invoke()
    if c63_1=='1' and b63_1var.get()==0:
        b63_1.invoke()
    if c63_2=='0' and b63_2var.get()==1:
        b63_2.invoke()
    if c63_2=='1' and b63_2var.get()==0:
        b63_2.invoke()
    if c63_3=='0' and b63_3var.get()==1:
        b63_3.invoke()
    if c63_3=='1' and b63_3var.get()==0:
        b63_3.invoke()
    if c63_4=='0' and b63_4var.get()==1:
        b63_4.invoke()
    if c63_4=='1' and b63_4var.get()==0:
        b63_4.invoke()
    if c63_5=='0' and b63_5var.get()==1:
        b63_5.invoke()
    if c63_5=='1' and b63_5var.get()==0:
        b63_5.invoke()
    if c63_7=='0' and b63_7var.get()==1:
        b63_7.invoke()
    if c63_7=='1' and b63_7var.get()==0:
        b63_7.invoke()

    if c64_0=='0' and b64_0var.get()==1:
        b64_0.invoke()
    if c64_0=='1' and b64_0var.get()==0:
        b64_0.invoke()
    if c64_1=='0' and b64_1var.get()==1:
        b64_1.invoke()
    if c64_1=='1' and b64_1var.get()==0:
        b64_1.invoke()
    if c64_2=='0' and b64_2var.get()==1:
        b64_2.invoke()
    if c64_2=='1' and b64_2var.get()==0:
        b64_2.invoke()
    if c64_3=='0' and b64_3var.get()==1:
        b64_3.invoke()
    if c64_3=='1' and b64_3var.get()==0:
        b64_3.invoke()
    if c64_4=='0' and b64_4var.get()==1:
        b64_4.invoke()
    if c64_4=='1' and b64_4var.get()==0:
        b64_4.invoke()
    if c64_5=='0' and b64_5var.get()==1:
        b64_5.invoke()
    if c64_5=='1' and b64_5var.get()==0:
        b64_5.invoke()
    if c64_7=='0' and b64_7var.get()==1:
        b64_7.invoke()
    if c64_7=='1' and b64_7var.get()==0:
        b64_7.invoke()

    if c65_0=='0' and b65_0var.get()==1:
        b65_0.invoke()
    if c65_0=='1' and b65_0var.get()==0:
        b65_0.invoke()
    if c65_1=='0' and b65_1var.get()==1:
        b65_1.invoke()
    if c65_1=='1' and b65_1var.get()==0:
        b65_1.invoke()
    if c65_2=='0' and b65_2var.get()==1:
        b65_2.invoke()
    if c65_2=='1' and b65_2var.get()==0:
        b65_2.invoke()
    if c65_3=='0' and b65_3var.get()==1:
        b65_3.invoke()
    if c65_3=='1' and b65_3var.get()==0:
        b65_3.invoke()
    if c65_4=='0' and b65_4var.get()==1:
        b65_4.invoke()
    if c65_4=='1' and b65_4var.get()==0:
        b65_4.invoke()
    if c65_5=='0' and b65_5var.get()==1:
        b65_5.invoke()
    if c65_5=='1' and b65_5var.get()==0:
        b65_5.invoke()
    if c65_7=='0' and b65_7var.get()==1:
        b65_7.invoke()
    if c65_7=='1' and b65_7var.get()==0:
        b65_7.invoke()

    if c66_0=='0' and b66_0var.get()==1:
        b66_0.invoke()
    if c66_0=='1' and b66_0var.get()==0:
        b66_0.invoke()
    if c66_1=='0' and b66_1var.get()==1:
        b66_1.invoke()
    if c66_1=='1' and b66_1var.get()==0:
        b66_1.invoke()
    if c66_2=='0' and b66_2var.get()==1:
        b66_2.invoke()
    if c66_2=='1' and b66_2var.get()==0:
        b66_2.invoke()
    if c66_3=='0' and b66_3var.get()==1:
        b66_3.invoke()
    if c66_3=='1' and b66_3var.get()==0:
        b66_3.invoke()
    if c66_4=='0' and b66_4var.get()==1:
        b66_4.invoke()
    if c66_4=='1' and b66_4var.get()==0:
        b66_4.invoke()
    if c66_5=='0' and b66_5var.get()==1:
        b66_5.invoke()
    if c66_5=='1' and b66_5var.get()==0:
        b66_5.invoke()
    if c66_7=='0' and b66_7var.get()==1:
        b66_7.invoke()
    if c66_7=='1' and b66_7var.get()==0:
        b66_7.invoke()

    if c67_0=='0' and b67_0var.get()==1:
        b67_0.invoke()
    if c67_0=='1' and b67_0var.get()==0:
        b67_0.invoke()
    if c67_1=='0' and b67_1var.get()==1:
        b67_1.invoke()
    if c67_1=='1' and b67_1var.get()==0:
        b67_1.invoke()
    if c67_2=='0' and b67_2var.get()==1:
        b67_2.invoke()
    if c67_2=='1' and b67_2var.get()==0:
        b67_2.invoke()
    if c67_3=='0' and b67_3var.get()==1:
        b67_3.invoke()
    if c67_3=='1' and b67_3var.get()==0:
        b67_3.invoke()
    if c67_4=='0' and b67_4var.get()==1:
        b67_4.invoke()
    if c67_4=='1' and b67_4var.get()==0:
        b67_4.invoke()
    if c67_5=='0' and b67_5var.get()==1:
        b67_5.invoke()
    if c67_5=='1' and b67_5var.get()==0:
        b67_5.invoke()
    if c67_7=='0' and b67_7var.get()==1:
        b67_7.invoke()
    if c67_7=='1' and b67_7var.get()==0:
        b67_7.invoke()

    if c68_0=='0' and b68_0var.get()==1:
        b68_0.invoke()
    if c68_0=='1' and b68_0var.get()==0:
        b68_0.invoke()
    if c68_1=='0' and b68_1var.get()==1:
        b68_1.invoke()
    if c68_1=='1' and b68_1var.get()==0:
        b68_1.invoke()
    if c68_2=='0' and b68_2var.get()==1:
        b68_2.invoke()
    if c68_2=='1' and b68_2var.get()==0:
        b68_2.invoke()
    if c68_3=='0' and b68_3var.get()==1:
        b68_3.invoke()
    if c68_3=='1' and b68_3var.get()==0:
        b68_3.invoke()
    if c68_4=='0' and b68_4var.get()==1:
        b68_4.invoke()
    if c68_4=='1' and b68_4var.get()==0:
        b68_4.invoke()
    if c68_5=='0' and b68_5var.get()==1:
        b68_5.invoke()
    if c68_5=='1' and b68_5var.get()==0:
        b68_5.invoke()
    if c68_7=='0' and b68_7var.get()==1:
        b68_7.invoke()
    if c68_7=='1' and b68_7var.get()==0:
        b68_7.invoke()

    if c69_0=='0' and b69_0var.get()==1:
        b69_0.invoke()
    if c69_0=='1' and b69_0var.get()==0:
        b69_0.invoke()
    if c69_1=='0' and b69_1var.get()==1:
        b69_1.invoke()
    if c69_1=='1' and b69_1var.get()==0:
        b69_1.invoke()
    if c69_2=='0' and b69_2var.get()==1:
        b69_2.invoke()
    if c69_2=='1' and b69_2var.get()==0:
        b69_2.invoke()
    if c69_3=='0' and b69_3var.get()==1:
        b69_3.invoke()
    if c69_3=='1' and b69_3var.get()==0:
        b69_3.invoke()
    if c69_4=='0' and b69_4var.get()==1:
        b69_4.invoke()
    if c69_4=='1' and b69_4var.get()==0:
        b69_4.invoke()
    if c69_5=='0' and b69_5var.get()==1:
        b69_5.invoke()
    if c69_5=='1' and b69_5var.get()==0:
        b69_5.invoke()
    if c69_7=='0' and b69_7var.get()==1:
        b69_7.invoke()
    if c69_7=='1' and b69_7var.get()==0:
        b69_7.invoke()

    if c70_0=='0' and b70_0var.get()==1:
        b70_0.invoke()
    if c70_0=='1' and b70_0var.get()==0:
        b70_0.invoke()
    if c70_1=='0' and b70_1var.get()==1:
        b70_1.invoke()
    if c70_1=='1' and b70_1var.get()==0:
        b70_1.invoke()
    if c70_2=='0' and b70_2var.get()==1:
        b70_2.invoke()
    if c70_2=='1' and b70_2var.get()==0:
        b70_2.invoke()
    if c70_3=='0' and b70_3var.get()==1:
        b70_3.invoke()
    if c70_3=='1' and b70_3var.get()==0:
        b70_3.invoke()
    if c70_4=='0' and b70_4var.get()==1:
        b70_4.invoke()
    if c70_4=='1' and b70_4var.get()==0:
        b70_4.invoke()
    if c70_5=='0' and b70_5var.get()==1:
        b70_5.invoke()
    if c70_5=='1' and b70_5var.get()==0:
        b70_5.invoke()
    if c70_7=='0' and b70_7var.get()==1:
        b70_7.invoke()
    if c70_7=='1' and b70_7var.get()==0:
        b70_7.invoke()

    if c71_0=='0' and b71_0var.get()==1:
        b71_0.invoke()
    if c71_0=='1' and b71_0var.get()==0:
        b71_0.invoke()
    if c71_1=='0' and b71_1var.get()==1:
        b71_1.invoke()
    if c71_1=='1' and b71_1var.get()==0:
        b71_1.invoke()
    if c71_2=='0' and b71_2var.get()==1:
        b71_2.invoke()
    if c71_2=='1' and b71_2var.get()==0:
        b71_2.invoke()
    if c71_3=='0' and b71_3var.get()==1:
        b71_3.invoke()
    if c71_3=='1' and b71_3var.get()==0:
        b71_3.invoke()
    if c71_4=='0' and b71_4var.get()==1:
        b71_4.invoke()
    if c71_4=='1' and b71_4var.get()==0:
        b71_4.invoke()
    if c71_5=='0' and b71_5var.get()==1:
        b71_5.invoke()
    if c71_5=='1' and b71_5var.get()==0:
        b71_5.invoke()
    if c71_7=='0' and b71_7var.get()==1:
        b71_7.invoke()
    if c71_7=='1' and b71_7var.get()==0:
        b71_7.invoke()

    if c72_0=='0' and b72_0var.get()==1:
        b72_0.invoke()
    if c72_0=='1' and b72_0var.get()==0:
        b72_0.invoke()
    if c72_1=='0' and b72_1var.get()==1:
        b72_1.invoke()
    if c72_1=='1' and b72_1var.get()==0:
        b72_1.invoke()
    if c72_2=='0' and b72_2var.get()==1:
        b72_2.invoke()
    if c72_2=='1' and b72_2var.get()==0:
        b72_2.invoke()
    if c72_3=='0' and b72_3var.get()==1:
        b72_3.invoke()
    if c72_3=='1' and b72_3var.get()==0:
        b72_3.invoke()
    if c72_4=='0' and b72_4var.get()==1:
        b72_4.invoke()
    if c72_4=='1' and b72_4var.get()==0:
        b72_4.invoke()
    if c72_5=='0' and b72_5var.get()==1:
        b72_5.invoke()
    if c72_5=='1' and b72_5var.get()==0:
        b72_5.invoke()
    if c72_7=='0' and b72_7var.get()==1:
        b72_7.invoke()
    if c72_7=='1' and b72_7var.get()==0:
        b72_7.invoke()

    if c73_0=='0' and b73_0var.get()==1:
        b73_0.invoke()
    if c73_0=='1' and b73_0var.get()==0:
        b73_0.invoke()
    if c73_1=='0' and b73_1var.get()==1:
        b73_1.invoke()
    if c73_1=='1' and b73_1var.get()==0:
        b73_1.invoke()
    if c73_2=='0' and b73_2var.get()==1:
        b73_2.invoke()
    if c73_2=='1' and b73_2var.get()==0:
        b73_2.invoke()
    if c73_3=='0' and b73_3var.get()==1:
        b73_3.invoke()
    if c73_3=='1' and b73_3var.get()==0:
        b73_3.invoke()
    if c73_4=='0' and b73_4var.get()==1:
        b73_4.invoke()
    if c73_4=='1' and b73_4var.get()==0:
        b73_4.invoke()
    if c73_5=='0' and b73_5var.get()==1:
        b73_5.invoke()
    if c73_5=='1' and b73_5var.get()==0:
        b73_5.invoke()
    if c73_7=='0' and b73_7var.get()==1:
        b73_7.invoke()
    if c73_7=='1' and b73_7var.get()==0:
        b73_7.invoke()

    if c74_0=='0' and b74_0var.get()==1:
        b74_0.invoke()
    if c74_0=='1' and b74_0var.get()==0:
        b74_0.invoke()
    if c74_1=='0' and b74_1var.get()==1:
        b74_1.invoke()
    if c74_1=='1' and b74_1var.get()==0:
        b74_1.invoke()
    if c74_2=='0' and b74_2var.get()==1:
        b74_2.invoke()
    if c74_2=='1' and b74_2var.get()==0:
        b74_2.invoke()
    if c74_3=='0' and b74_3var.get()==1:
        b74_3.invoke()
    if c74_3=='1' and b74_3var.get()==0:
        b74_3.invoke()
    if c74_4=='0' and b74_4var.get()==1:
        b74_4.invoke()
    if c74_4=='1' and b74_4var.get()==0:
        b74_4.invoke()
    if c74_5=='0' and b74_5var.get()==1:
        b74_5.invoke()
    if c74_5=='1' and b74_5var.get()==0:
        b74_5.invoke()
    if c74_7=='0' and b74_7var.get()==1:
        b74_7.invoke()
    if c74_7=='1' and b74_7var.get()==0:
        b74_7.invoke()

    if c75_0=='0' and b75_0var.get()==1:
        b75_0.invoke()
    if c75_0=='1' and b75_0var.get()==0:
        b75_0.invoke()
    if c75_1=='0' and b75_1var.get()==1:
        b75_1.invoke()
    if c75_1=='1' and b75_1var.get()==0:
        b75_1.invoke()
    if c75_2=='0' and b75_2var.get()==1:
        b75_2.invoke()
    if c75_2=='1' and b75_2var.get()==0:
        b75_2.invoke()
    if c75_3=='0' and b75_3var.get()==1:
        b75_3.invoke()
    if c75_3=='1' and b75_3var.get()==0:
        b75_3.invoke()
    if c75_4=='0' and b75_4var.get()==1:
        b75_4.invoke()
    if c75_4=='1' and b75_4var.get()==0:
        b75_4.invoke()
    if c75_5=='0' and b75_5var.get()==1:
        b75_5.invoke()
    if c75_5=='1' and b75_5var.get()==0:
        b75_5.invoke()
    if c75_7=='0' and b75_7var.get()==1:
        b75_7.invoke()
    if c75_7=='1' and b75_7var.get()==0:
        b75_7.invoke()

    if c76_0=='0' and b76_0var.get()==1:
        b76_0.invoke()
    if c76_0=='1' and b76_0var.get()==0:
        b76_0.invoke()
    if c76_1=='0' and b76_1var.get()==1:
        b76_1.invoke()
    if c76_1=='1' and b76_1var.get()==0:
        b76_1.invoke()
    if c76_2=='0' and b76_2var.get()==1:
        b76_2.invoke()
    if c76_2=='1' and b76_2var.get()==0:
        b76_2.invoke()
    if c76_3=='0' and b76_3var.get()==1:
        b76_3.invoke()
    if c76_3=='1' and b76_3var.get()==0:
        b76_3.invoke()
    if c76_4=='0' and b76_4var.get()==1:
        b76_4.invoke()
    if c76_4=='1' and b76_4var.get()==0:
        b76_4.invoke()
    if c76_5=='0' and b76_5var.get()==1:
        b76_5.invoke()
    if c76_5=='1' and b76_5var.get()==0:
        b76_5.invoke()
    if c76_7=='0' and b76_7var.get()==1:
        b76_7.invoke()
    if c76_7=='1' and b76_7var.get()==0:
        b76_7.invoke()

    if c77_0=='0' and b77_0var.get()==1:
        b77_0.invoke()
    if c77_0=='1' and b77_0var.get()==0:
        b77_0.invoke()
    if c77_1=='0' and b77_1var.get()==1:
        b77_1.invoke()
    if c77_1=='1' and b77_1var.get()==0:
        b77_1.invoke()
    if c77_2=='0' and b77_2var.get()==1:
        b77_2.invoke()
    if c77_2=='1' and b77_2var.get()==0:
        b77_2.invoke()
    if c77_3=='0' and b77_3var.get()==1:
        b77_3.invoke()
    if c77_3=='1' and b77_3var.get()==0:
        b77_3.invoke()
    if c77_4=='0' and b77_4var.get()==1:
        b77_4.invoke()
    if c77_4=='1' and b77_4var.get()==0:
        b77_4.invoke()
    if c77_5=='0' and b77_5var.get()==1:
        b77_5.invoke()
    if c77_5=='1' and b77_5var.get()==0:
        b77_5.invoke()
    if c77_7=='0' and b77_7var.get()==1:
        b77_7.invoke()
    if c77_7=='1' and b77_7var.get()==0:
        b77_7.invoke()

    if c78_0=='0' and b78_0var.get()==1:
        b78_0.invoke()
    if c78_0=='1' and b78_0var.get()==0:
        b78_0.invoke()
    if c78_1=='0' and b78_1var.get()==1:
        b78_1.invoke()
    if c78_1=='1' and b78_1var.get()==0:
        b78_1.invoke()
    if c78_2=='0' and b78_2var.get()==1:
        b78_2.invoke()
    if c78_2=='1' and b78_2var.get()==0:
        b78_2.invoke()
    if c78_3=='0' and b78_3var.get()==1:
        b78_3.invoke()
    if c78_3=='1' and b78_3var.get()==0:
        b78_3.invoke()
    if c78_4=='0' and b78_4var.get()==1:
        b78_4.invoke()
    if c78_4=='1' and b78_4var.get()==0:
        b78_4.invoke()
    if c78_5=='0' and b78_5var.get()==1:
        b78_5.invoke()
    if c78_5=='1' and b78_5var.get()==0:
        b78_5.invoke()
    if c78_7=='0' and b78_7var.get()==1:
        b78_7.invoke()
    if c78_7=='1' and b78_7var.get()==0:
        b78_7.invoke()

    if c79_0=='0' and b79_0var.get()==1:
        b79_0.invoke()
    if c79_0=='1' and b79_0var.get()==0:
        b79_0.invoke()
    if c79_1=='0' and b79_1var.get()==1:
        b79_1.invoke()
    if c79_1=='1' and b79_1var.get()==0:
        b79_1.invoke()
    if c79_2=='0' and b79_2var.get()==1:
        b79_2.invoke()
    if c79_2=='1' and b79_2var.get()==0:
        b79_2.invoke()
    if c79_3=='0' and b79_3var.get()==1:
        b79_3.invoke()
    if c79_3=='1' and b79_3var.get()==0:
        b79_3.invoke()
    if c79_4=='0' and b79_4var.get()==1:
        b79_4.invoke()
    if c79_4=='1' and b79_4var.get()==0:
        b79_4.invoke()
    if c79_5=='0' and b79_5var.get()==1:
        b79_5.invoke()
    if c79_5=='1' and b79_5var.get()==0:
        b79_5.invoke()
    if c79_7=='0' and b79_7var.get()==1:
        b79_7.invoke()
    if c79_7=='1' and b79_7var.get()==0:
        b79_7.invoke()

    if c80_0=='0' and b80_0var.get()==1:
        b80_0.invoke()
    if c80_0=='1' and b80_0var.get()==0:
        b80_0.invoke()
    if c80_1=='0' and b80_1var.get()==1:
        b80_1.invoke()
    if c80_1=='1' and b80_1var.get()==0:
        b80_1.invoke()
    if c80_2=='0' and b80_2var.get()==1:
        b80_2.invoke()
    if c80_2=='1' and b80_2var.get()==0:
        b80_2.invoke()
    if c80_3=='0' and b80_3var.get()==1:
        b80_3.invoke()
    if c80_3=='1' and b80_3var.get()==0:
        b80_3.invoke()
    if c80_4=='0' and b80_4var.get()==1:
        b80_4.invoke()
    if c80_4=='1' and b80_4var.get()==0:
        b80_4.invoke()
    if c80_5=='0' and b80_5var.get()==1:
        b80_5.invoke()
    if c80_5=='1' and b80_5var.get()==0:
        b80_5.invoke()
    if c80_7=='0' and b80_7var.get()==1:
        b80_7.invoke()
    if c80_7=='1' and b80_7var.get()==0:
        b80_7.invoke()

    if c81_0=='0' and b81_0var.get()==1:
        b81_0.invoke()
    if c81_0=='1' and b81_0var.get()==0:
        b81_0.invoke()
    if c81_1=='0' and b81_1var.get()==1:
        b81_1.invoke()
    if c81_1=='1' and b81_1var.get()==0:
        b81_1.invoke()
    if c81_2=='0' and b81_2var.get()==1:
        b81_2.invoke()
    if c81_2=='1' and b81_2var.get()==0:
        b81_2.invoke()
    if c81_3=='0' and b81_3var.get()==1:
        b81_3.invoke()
    if c81_3=='1' and b81_3var.get()==0:
        b81_3.invoke()
    if c81_4=='0' and b81_4var.get()==1:
        b81_4.invoke()
    if c81_4=='1' and b81_4var.get()==0:
        b81_4.invoke()
    if c81_5=='0' and b81_5var.get()==1:
        b81_5.invoke()
    if c81_5=='1' and b81_5var.get()==0:
        b81_5.invoke()
    if c81_7=='0' and b81_7var.get()==1:
        b81_7.invoke()
    if c81_7=='1' and b81_7var.get()==0:
        b81_7.invoke()

    if c82_0=='0' and b82_0var.get()==1:
        b82_0.invoke()
    if c82_0=='1' and b82_0var.get()==0:
        b82_0.invoke()
    if c82_1=='0' and b82_1var.get()==1:
        b82_1.invoke()
    if c82_1=='1' and b82_1var.get()==0:
        b82_1.invoke()
    if c82_2=='0' and b82_2var.get()==1:
        b82_2.invoke()
    if c82_2=='1' and b82_2var.get()==0:
        b82_2.invoke()
    if c82_3=='0' and b82_3var.get()==1:
        b82_3.invoke()
    if c82_3=='1' and b82_3var.get()==0:
        b82_3.invoke()
    if c82_4=='0' and b82_4var.get()==1:
        b82_4.invoke()
    if c82_4=='1' and b82_4var.get()==0:
        b82_4.invoke()
    if c82_5=='0' and b82_5var.get()==1:
        b82_5.invoke()
    if c82_5=='1' and b82_5var.get()==0:
        b82_5.invoke()
    if c82_7=='0' and b82_7var.get()==1:
        b82_7.invoke()
    if c82_7=='1' and b82_7var.get()==0:
        b82_7.invoke()

    if c83_0=='0' and b83_0var.get()==1:
        b83_0.invoke()
    if c83_0=='1' and b83_0var.get()==0:
        b83_0.invoke()
    if c83_1=='0' and b83_1var.get()==1:
        b83_1.invoke()
    if c83_1=='1' and b83_1var.get()==0:
        b83_1.invoke()
    if c83_2=='0' and b83_2var.get()==1:
        b83_2.invoke()
    if c83_2=='1' and b83_2var.get()==0:
        b83_2.invoke()
    if c83_3=='0' and b83_3var.get()==1:
        b83_3.invoke()
    if c83_3=='1' and b83_3var.get()==0:
        b83_3.invoke()
    if c83_4=='0' and b83_4var.get()==1:
        b83_4.invoke()
    if c83_4=='1' and b83_4var.get()==0:
        b83_4.invoke()
    if c83_5=='0' and b83_5var.get()==1:
        b83_5.invoke()
    if c83_5=='1' and b83_5var.get()==0:
        b83_5.invoke()
    if c83_7=='0' and b83_7var.get()==1:
        b83_7.invoke()
    if c83_7=='1' and b83_7var.get()==0:
        b83_7.invoke()

    if c84_0=='0' and b84_0var.get()==1:
        b84_0.invoke()
    if c84_0=='1' and b84_0var.get()==0:
        b84_0.invoke()
    if c84_1=='0' and b84_1var.get()==1:
        b84_1.invoke()
    if c84_1=='1' and b84_1var.get()==0:
        b84_1.invoke()
    if c84_2=='0' and b84_2var.get()==1:
        b84_2.invoke()
    if c84_2=='1' and b84_2var.get()==0:
        b84_2.invoke()
    if c84_3=='0' and b84_3var.get()==1:
        b84_3.invoke()
    if c84_3=='1' and b84_3var.get()==0:
        b84_3.invoke()
    if c84_4=='0' and b84_4var.get()==1:
        b84_4.invoke()
    if c84_4=='1' and b84_4var.get()==0:
        b84_4.invoke()
    if c84_5=='0' and b84_5var.get()==1:
        b84_5.invoke()
    if c84_5=='1' and b84_5var.get()==0:
        b84_5.invoke()
    if c84_7=='0' and b84_7var.get()==1:
        b84_7.invoke()
    if c84_7=='1' and b84_7var.get()==0:
        b84_7.invoke()

    if c85_0=='0' and b85_0var.get()==1:
        b85_0.invoke()
    if c85_0=='1' and b85_0var.get()==0:
        b85_0.invoke()
    if c85_1=='0' and b85_1var.get()==1:
        b85_1.invoke()
    if c85_1=='1' and b85_1var.get()==0:
        b85_1.invoke()
    if c85_2=='0' and b85_2var.get()==1:
        b85_2.invoke()
    if c85_2=='1' and b85_2var.get()==0:
        b85_2.invoke()
    if c85_3=='0' and b85_3var.get()==1:
        b85_3.invoke()
    if c85_3=='1' and b85_3var.get()==0:
        b85_3.invoke()
    if c85_4=='0' and b85_4var.get()==1:
        b85_4.invoke()
    if c85_4=='1' and b85_4var.get()==0:
        b85_4.invoke()
    if c85_5=='0' and b85_5var.get()==1:
        b85_5.invoke()
    if c85_5=='1' and b85_5var.get()==0:
        b85_5.invoke()
    if c85_7=='0' and b85_7var.get()==1:
        b85_7.invoke()
    if c85_7=='1' and b85_7var.get()==0:
        b85_7.invoke()

    if c86_0=='0' and b86_0var.get()==1:
        b86_0.invoke()
    if c86_0=='1' and b86_0var.get()==0:
        b86_0.invoke()
    if c86_1=='0' and b86_1var.get()==1:
        b86_1.invoke()
    if c86_1=='1' and b86_1var.get()==0:
        b86_1.invoke()
    if c86_2=='0' and b86_2var.get()==1:
        b86_2.invoke()
    if c86_2=='1' and b86_2var.get()==0:
        b86_2.invoke()
    if c86_3=='0' and b86_3var.get()==1:
        b86_3.invoke()
    if c86_3=='1' and b86_3var.get()==0:
        b86_3.invoke()
    if c86_4=='0' and b86_4var.get()==1:
        b86_4.invoke()
    if c86_4=='1' and b86_4var.get()==0:
        b86_4.invoke()
    if c86_5=='0' and b86_5var.get()==1:
        b86_5.invoke()
    if c86_5=='1' and b86_5var.get()==0:
        b86_5.invoke()
    if c86_7=='0' and b86_7var.get()==1:
        b86_7.invoke()
    if c86_7=='1' and b86_7var.get()==0:
        b86_7.invoke()

    if c87_0=='0' and b87_0var.get()==1:
        b87_0.invoke()
    if c87_0=='1' and b87_0var.get()==0:
        b87_0.invoke()
    if c87_1=='0' and b87_1var.get()==1:
        b87_1.invoke()
    if c87_1=='1' and b87_1var.get()==0:
        b87_1.invoke()
    if c87_2=='0' and b87_2var.get()==1:
        b87_2.invoke()
    if c87_2=='1' and b87_2var.get()==0:
        b87_2.invoke()
    if c87_3=='0' and b87_3var.get()==1:
        b87_3.invoke()
    if c87_3=='1' and b87_3var.get()==0:
        b87_3.invoke()
    if c87_4=='0' and b87_4var.get()==1:
        b87_4.invoke()
    if c87_4=='1' and b87_4var.get()==0:
        b87_4.invoke()
    if c87_5=='0' and b87_5var.get()==1:
        b87_5.invoke()
    if c87_5=='1' and b87_5var.get()==0:
        b87_5.invoke()
    if c87_7=='0' and b87_7var.get()==1:
        b87_7.invoke()
    if c87_7=='1' and b87_7var.get()==0:
        b87_7.invoke()

    if c88_0=='0' and b88_0var.get()==1:
        b88_0.invoke()
    if c88_0=='1' and b88_0var.get()==0:
        b88_0.invoke()
    if c88_1=='0' and b88_1var.get()==1:
        b88_1.invoke()
    if c88_1=='1' and b88_1var.get()==0:
        b88_1.invoke()
    if c88_2=='0' and b88_2var.get()==1:
        b88_2.invoke()
    if c88_2=='1' and b88_2var.get()==0:
        b88_2.invoke()
    if c88_3=='0' and b88_3var.get()==1:
        b88_3.invoke()
    if c88_3=='1' and b88_3var.get()==0:
        b88_3.invoke()
    if c88_4=='0' and b88_4var.get()==1:
        b88_4.invoke()
    if c88_4=='1' and b88_4var.get()==0:
        b88_4.invoke()
    if c88_5=='0' and b88_5var.get()==1:
        b88_5.invoke()
    if c88_5=='1' and b88_5var.get()==0:
        b88_5.invoke()
    if c88_7=='0' and b88_7var.get()==1:
        b88_7.invoke()
    if c88_7=='1' and b88_7var.get()==0:
        b88_7.invoke()

    if c89_0=='0' and b89_0var.get()==1:
        b89_0.invoke()
    if c89_0=='1' and b89_0var.get()==0:
        b89_0.invoke()
    if c89_1=='0' and b89_1var.get()==1:
        b89_1.invoke()
    if c89_1=='1' and b89_1var.get()==0:
        b89_1.invoke()
    if c89_2=='0' and b89_2var.get()==1:
        b89_2.invoke()
    if c89_2=='1' and b89_2var.get()==0:
        b89_2.invoke()
    if c89_3=='0' and b89_3var.get()==1:
        b89_3.invoke()
    if c89_3=='1' and b89_3var.get()==0:
        b89_3.invoke()
    if c89_4=='0' and b89_4var.get()==1:
        b89_4.invoke()
    if c89_4=='1' and b89_4var.get()==0:
        b89_4.invoke()
    if c89_5=='0' and b89_5var.get()==1:
        b89_5.invoke()
    if c89_5=='1' and b89_5var.get()==0:
        b89_5.invoke()
    if c89_7=='0' and b89_7var.get()==1:
        b89_7.invoke()
    if c89_7=='1' and b89_7var.get()==0:
        b89_7.invoke()

    if c90_0=='0' and b90_0var.get()==1:
        b90_0.invoke()
    if c90_0=='1' and b90_0var.get()==0:
        b90_0.invoke()
    if c90_1=='0' and b90_1var.get()==1:
        b90_1.invoke()
    if c90_1=='1' and b90_1var.get()==0:
        b90_1.invoke()
    if c90_2=='0' and b90_2var.get()==1:
        b90_2.invoke()
    if c90_2=='1' and b90_2var.get()==0:
        b90_2.invoke()
    if c90_3=='0' and b90_3var.get()==1:
        b90_3.invoke()
    if c90_3=='1' and b90_3var.get()==0:
        b90_3.invoke()
    if c90_4=='0' and b90_4var.get()==1:
        b90_4.invoke()
    if c90_4=='1' and b90_4var.get()==0:
        b90_4.invoke()
    if c90_5=='0' and b90_5var.get()==1:
        b90_5.invoke()
    if c90_5=='1' and b90_5var.get()==0:
        b90_5.invoke()
    if c90_7=='0' and b90_7var.get()==1:
        b90_7.invoke()
    if c90_7=='1' and b90_7var.get()==0:
        b90_7.invoke()

    if c91_0=='0' and b91_0var.get()==1:
        b91_0.invoke()
    if c91_0=='1' and b91_0var.get()==0:
        b91_0.invoke()
    if c91_1=='0' and b91_1var.get()==1:
        b91_1.invoke()
    if c91_1=='1' and b91_1var.get()==0:
        b91_1.invoke()
    if c91_2=='0' and b91_2var.get()==1:
        b91_2.invoke()
    if c91_2=='1' and b91_2var.get()==0:
        b91_2.invoke()
    if c91_3=='0' and b91_3var.get()==1:
        b91_3.invoke()
    if c91_3=='1' and b91_3var.get()==0:
        b91_3.invoke()
    if c91_4=='0' and b91_4var.get()==1:
        b91_4.invoke()
    if c91_4=='1' and b91_4var.get()==0:
        b91_4.invoke()
    if c91_5=='0' and b91_5var.get()==1:
        b91_5.invoke()
    if c91_5=='1' and b91_5var.get()==0:
        b91_5.invoke()
    if c91_7=='0' and b91_7var.get()==1:
        b91_7.invoke()
    if c91_7=='1' and b91_7var.get()==0:
        b91_7.invoke()

    if c92_0=='0' and b92_0var.get()==1:
        b92_0.invoke()
    if c92_0=='1' and b92_0var.get()==0:
        b92_0.invoke()
    if c92_1=='0' and b92_1var.get()==1:
        b92_1.invoke()
    if c92_1=='1' and b92_1var.get()==0:
        b92_1.invoke()
    if c92_2=='0' and b92_2var.get()==1:
        b92_2.invoke()
    if c92_2=='1' and b92_2var.get()==0:
        b92_2.invoke()
    if c92_3=='0' and b92_3var.get()==1:
        b92_3.invoke()
    if c92_3=='1' and b92_3var.get()==0:
        b92_3.invoke()
    if c92_4=='0' and b92_4var.get()==1:
        b92_4.invoke()
    if c92_4=='1' and b92_4var.get()==0:
        b92_4.invoke()
    if c92_5=='0' and b92_5var.get()==1:
        b92_5.invoke()
    if c92_5=='1' and b92_5var.get()==0:
        b92_5.invoke()
    if c92_7=='0' and b92_7var.get()==1:
        b92_7.invoke()
    if c92_7=='1' and b92_7var.get()==0:
        b92_7.invoke()

    if c93_0=='0' and b93_0var.get()==1:
        b93_0.invoke()
    if c93_0=='1' and b93_0var.get()==0:
        b93_0.invoke()
    if c93_1=='0' and b93_1var.get()==1:
        b93_1.invoke()
    if c93_1=='1' and b93_1var.get()==0:
        b93_1.invoke()
    if c93_2=='0' and b93_2var.get()==1:
        b93_2.invoke()
    if c93_2=='1' and b93_2var.get()==0:
        b93_2.invoke()
    if c93_3=='0' and b93_3var.get()==1:
        b93_3.invoke()
    if c93_3=='1' and b93_3var.get()==0:
        b93_3.invoke()
    if c93_4=='0' and b93_4var.get()==1:
        b93_4.invoke()
    if c93_4=='1' and b93_4var.get()==0:
        b93_4.invoke()
    if c93_5=='0' and b93_5var.get()==1:
        b93_5.invoke()
    if c93_5=='1' and b93_5var.get()==0:
        b93_5.invoke()
    if c93_7=='0' and b93_7var.get()==1:
        b93_7.invoke()
    if c93_7=='1' and b93_7var.get()==0:
        b93_7.invoke()

    if c94_0=='0' and b94_0var.get()==1:
        b94_0.invoke()
    if c94_0=='1' and b94_0var.get()==0:
        b94_0.invoke()
    if c94_1=='0' and b94_1var.get()==1:
        b94_1.invoke()
    if c94_1=='1' and b94_1var.get()==0:
        b94_1.invoke()
    if c94_2=='0' and b94_2var.get()==1:
        b94_2.invoke()
    if c94_2=='1' and b94_2var.get()==0:
        b94_2.invoke()
    if c94_3=='0' and b94_3var.get()==1:
        b94_3.invoke()
    if c94_3=='1' and b94_3var.get()==0:
        b94_3.invoke()
    if c94_4=='0' and b94_4var.get()==1:
        b94_4.invoke()
    if c94_4=='1' and b94_4var.get()==0:
        b94_4.invoke()
    if c94_5=='0' and b94_5var.get()==1:
        b94_5.invoke()
    if c94_5=='1' and b94_5var.get()==0:
        b94_5.invoke()
    if c94_7=='0' and b94_7var.get()==1:
        b94_7.invoke()
    if c94_7=='1' and b94_7var.get()==0:
        b94_7.invoke()

    if c95_0=='0' and b95_0var.get()==1:
        b95_0.invoke()
    if c95_0=='1' and b95_0var.get()==0:
        b95_0.invoke()
    if c95_1=='0' and b95_1var.get()==1:
        b95_1.invoke()
    if c95_1=='1' and b95_1var.get()==0:
        b95_1.invoke()
    if c95_2=='0' and b95_2var.get()==1:
        b95_2.invoke()
    if c95_2=='1' and b95_2var.get()==0:
        b95_2.invoke()
    if c95_3=='0' and b95_3var.get()==1:
        b95_3.invoke()
    if c95_3=='1' and b95_3var.get()==0:
        b95_3.invoke()
    if c95_4=='0' and b95_4var.get()==1:
        b95_4.invoke()
    if c95_4=='1' and b95_4var.get()==0:
        b95_4.invoke()
    if c95_5=='0' and b95_5var.get()==1:
        b95_5.invoke()
    if c95_5=='1' and b95_5var.get()==0:
        b95_5.invoke()
    if c95_7=='0' and b95_7var.get()==1:
        b95_7.invoke()
    if c95_7=='1' and b95_7var.get()==0:
        b95_7.invoke()
    if c96_loop==0 and loop_var.get()==1:
        loop_0.invoke()
    if c96_loop==1 and loop_var.get()==0:
        loop_0.invoke()

# save data
def file_save():
    f = tkFileDialog.asksaveasfile(mode='w', defaultextension=".seq", filetypes=[('Sequence files', '.seq'), ('Text Files', '.txt'), ('All Files', '.*')])
    if f is None:
        return

    f.write (str(b0_0var.get())+' '+str(b0_1var.get())+' '+str(b0_2var.get())+' '+str(b0_3var.get())+' '+str(b0_4var.get())+' '+str(b0_5var.get())+' '+str(b0_6var.get())+' '+str(b0_7var.get())+' ')
    f.write (str(b1_0var.get())+' '+str(b1_1var.get())+' '+str(b1_2var.get())+' '+str(b1_3var.get())+' '+str(b1_4var.get())+' '+str(b1_5var.get())+' '+str(b1_7var.get())+' ')
    f.write (str(b2_0var.get())+' '+str(b2_1var.get())+' '+str(b2_2var.get())+' '+str(b2_3var.get())+' '+str(b2_4var.get())+' '+str(b2_5var.get())+' '+str(b2_7var.get())+' ')
    f.write (str(b3_0var.get())+' '+str(b3_1var.get())+' '+str(b3_2var.get())+' '+str(b3_3var.get())+' '+str(b3_4var.get())+' '+str(b3_5var.get())+' '+str(b3_7var.get())+' ')
    f.write (str(b4_0var.get())+' '+str(b4_1var.get())+' '+str(b4_2var.get())+' '+str(b4_3var.get())+' '+str(b4_4var.get())+' '+str(b4_5var.get())+' '+str(b4_7var.get())+' ')
    f.write (str(b5_0var.get())+' '+str(b5_1var.get())+' '+str(b5_2var.get())+' '+str(b5_3var.get())+' '+str(b5_4var.get())+' '+str(b5_5var.get())+' '+str(b5_7var.get())+' ')
    f.write (str(b6_0var.get())+' '+str(b6_1var.get())+' '+str(b6_2var.get())+' '+str(b6_3var.get())+' '+str(b6_4var.get())+' '+str(b6_5var.get())+' '+str(b6_7var.get())+' ')
    f.write (str(b7_0var.get())+' '+str(b7_1var.get())+' '+str(b7_2var.get())+' '+str(b7_3var.get())+' '+str(b7_4var.get())+' '+str(b7_5var.get())+' '+str(b7_7var.get())+' ')
    f.write (str(b8_0var.get())+' '+str(b8_1var.get())+' '+str(b8_2var.get())+' '+str(b8_3var.get())+' '+str(b8_4var.get())+' '+str(b8_5var.get())+' '+str(b8_7var.get())+' ')
    f.write (str(b9_0var.get())+' '+str(b9_1var.get())+' '+str(b9_2var.get())+' '+str(b9_3var.get())+' '+str(b9_4var.get())+' '+str(b9_5var.get())+' '+str(b9_7var.get())+' ')
    f.write (str(b10_0var.get())+' '+str(b10_1var.get())+' '+str(b10_2var.get())+' '+str(b10_3var.get())+' '+str(b10_4var.get())+' '+str(b10_5var.get())+' '+str(b10_7var.get())+' ')
    f.write (str(b11_0var.get())+' '+str(b11_1var.get())+' '+str(b11_2var.get())+' '+str(b11_3var.get())+' '+str(b11_4var.get())+' '+str(b11_5var.get())+' '+str(b11_7var.get())+' ')
    f.write (str(b12_0var.get())+' '+str(b12_1var.get())+' '+str(b12_2var.get())+' '+str(b12_3var.get())+' '+str(b12_4var.get())+' '+str(b12_5var.get())+' '+str(b12_7var.get())+' ')
    f.write (str(b13_0var.get())+' '+str(b13_1var.get())+' '+str(b13_2var.get())+' '+str(b13_3var.get())+' '+str(b13_4var.get())+' '+str(b13_5var.get())+' '+str(b13_7var.get())+' ')
    f.write (str(b14_0var.get())+' '+str(b14_1var.get())+' '+str(b14_2var.get())+' '+str(b14_3var.get())+' '+str(b14_4var.get())+' '+str(b14_5var.get())+' '+str(b14_7var.get())+' ')
    f.write (str(b15_0var.get())+' '+str(b15_1var.get())+' '+str(b15_2var.get())+' '+str(b15_3var.get())+' '+str(b15_4var.get())+' '+str(b15_5var.get())+' '+str(b15_7var.get())+' ')
    f.write (str(b16_0var.get())+' '+str(b16_1var.get())+' '+str(b16_2var.get())+' '+str(b16_3var.get())+' '+str(b16_4var.get())+' '+str(b16_5var.get())+' '+str(b16_7var.get())+' ')
    f.write (str(b17_0var.get())+' '+str(b17_1var.get())+' '+str(b17_2var.get())+' '+str(b17_3var.get())+' '+str(b17_4var.get())+' '+str(b17_5var.get())+' '+str(b17_7var.get())+' ')
    f.write (str(b18_0var.get())+' '+str(b18_1var.get())+' '+str(b18_2var.get())+' '+str(b18_3var.get())+' '+str(b18_4var.get())+' '+str(b18_5var.get())+' '+str(b18_7var.get())+' ')
    f.write (str(b19_0var.get())+' '+str(b19_1var.get())+' '+str(b19_2var.get())+' '+str(b19_3var.get())+' '+str(b19_4var.get())+' '+str(b19_5var.get())+' '+str(b19_7var.get())+' ')
    f.write (str(b20_0var.get())+' '+str(b20_1var.get())+' '+str(b20_2var.get())+' '+str(b20_3var.get())+' '+str(b20_4var.get())+' '+str(b20_5var.get())+' '+str(b20_7var.get())+' ')
    f.write (str(b21_0var.get())+' '+str(b21_1var.get())+' '+str(b21_2var.get())+' '+str(b21_3var.get())+' '+str(b21_4var.get())+' '+str(b21_5var.get())+' '+str(b21_7var.get())+' ')
    f.write (str(b22_0var.get())+' '+str(b22_1var.get())+' '+str(b22_2var.get())+' '+str(b22_3var.get())+' '+str(b22_4var.get())+' '+str(b22_5var.get())+' '+str(b22_7var.get())+' ')
    f.write (str(b23_0var.get())+' '+str(b23_1var.get())+' '+str(b23_2var.get())+' '+str(b23_3var.get())+' '+str(b23_4var.get())+' '+str(b23_5var.get())+' '+str(b23_7var.get())+' ')
    f.write (str(b24_0var.get())+' '+str(b24_1var.get())+' '+str(b24_2var.get())+' '+str(b24_3var.get())+' '+str(b24_4var.get())+' '+str(b24_5var.get())+' '+str(b24_7var.get())+' ')
    f.write (str(b25_0var.get())+' '+str(b25_1var.get())+' '+str(b25_2var.get())+' '+str(b25_3var.get())+' '+str(b25_4var.get())+' '+str(b25_5var.get())+' '+str(b25_7var.get())+' ')
    f.write (str(b26_0var.get())+' '+str(b26_1var.get())+' '+str(b26_2var.get())+' '+str(b26_3var.get())+' '+str(b26_4var.get())+' '+str(b26_5var.get())+' '+str(b26_7var.get())+' ')
    f.write (str(b27_0var.get())+' '+str(b27_1var.get())+' '+str(b27_2var.get())+' '+str(b27_3var.get())+' '+str(b27_4var.get())+' '+str(b27_5var.get())+' '+str(b27_7var.get())+' ')
    f.write (str(b28_0var.get())+' '+str(b28_1var.get())+' '+str(b28_2var.get())+' '+str(b28_3var.get())+' '+str(b28_4var.get())+' '+str(b28_5var.get())+' '+str(b28_7var.get())+' ')
    f.write (str(b29_0var.get())+' '+str(b29_1var.get())+' '+str(b29_2var.get())+' '+str(b29_3var.get())+' '+str(b29_4var.get())+' '+str(b29_5var.get())+' '+str(b29_7var.get())+' ')
    f.write (str(b30_0var.get())+' '+str(b30_1var.get())+' '+str(b30_2var.get())+' '+str(b30_3var.get())+' '+str(b30_4var.get())+' '+str(b30_5var.get())+' '+str(b30_7var.get())+' ')
    f.write (str(b31_0var.get())+' '+str(b31_1var.get())+' '+str(b31_2var.get())+' '+str(b31_3var.get())+' '+str(b31_4var.get())+' '+str(b31_5var.get())+' '+str(b31_7var.get())+' ')
    f.write (str(b32_0var.get())+' '+str(b32_1var.get())+' '+str(b32_2var.get())+' '+str(b32_3var.get())+' '+str(b32_4var.get())+' '+str(b32_5var.get())+' '+str(b32_7var.get())+' ')
    f.write (str(b33_0var.get())+' '+str(b33_1var.get())+' '+str(b33_2var.get())+' '+str(b33_3var.get())+' '+str(b33_4var.get())+' '+str(b33_5var.get())+' '+str(b33_7var.get())+' ')
    f.write (str(b34_0var.get())+' '+str(b34_1var.get())+' '+str(b34_2var.get())+' '+str(b34_3var.get())+' '+str(b34_4var.get())+' '+str(b34_5var.get())+' '+str(b34_7var.get())+' ')
    f.write (str(b35_0var.get())+' '+str(b35_1var.get())+' '+str(b35_2var.get())+' '+str(b35_3var.get())+' '+str(b35_4var.get())+' '+str(b35_5var.get())+' '+str(b35_7var.get())+' ')
    f.write (str(b36_0var.get())+' '+str(b36_1var.get())+' '+str(b36_2var.get())+' '+str(b36_3var.get())+' '+str(b36_4var.get())+' '+str(b36_5var.get())+' '+str(b36_7var.get())+' ')
    f.write (str(b37_0var.get())+' '+str(b37_1var.get())+' '+str(b37_2var.get())+' '+str(b37_3var.get())+' '+str(b37_4var.get())+' '+str(b37_5var.get())+' '+str(b37_7var.get())+' ')
    f.write (str(b38_0var.get())+' '+str(b38_1var.get())+' '+str(b38_2var.get())+' '+str(b38_3var.get())+' '+str(b38_4var.get())+' '+str(b38_5var.get())+' '+str(b38_7var.get())+' ')
    f.write (str(b39_0var.get())+' '+str(b39_1var.get())+' '+str(b39_2var.get())+' '+str(b39_3var.get())+' '+str(b39_4var.get())+' '+str(b39_5var.get())+' '+str(b39_7var.get())+' ')
    f.write (str(b40_0var.get())+' '+str(b40_1var.get())+' '+str(b40_2var.get())+' '+str(b40_3var.get())+' '+str(b40_4var.get())+' '+str(b40_5var.get())+' '+str(b40_7var.get())+' ')
    f.write (str(b41_0var.get())+' '+str(b41_1var.get())+' '+str(b41_2var.get())+' '+str(b41_3var.get())+' '+str(b41_4var.get())+' '+str(b41_5var.get())+' '+str(b41_7var.get())+' ')
    f.write (str(b42_0var.get())+' '+str(b42_1var.get())+' '+str(b42_2var.get())+' '+str(b42_3var.get())+' '+str(b42_4var.get())+' '+str(b42_5var.get())+' '+str(b42_7var.get())+' ')
    f.write (str(b43_0var.get())+' '+str(b43_1var.get())+' '+str(b43_2var.get())+' '+str(b43_3var.get())+' '+str(b43_4var.get())+' '+str(b43_5var.get())+' '+str(b43_7var.get())+' ')
    f.write (str(b44_0var.get())+' '+str(b44_1var.get())+' '+str(b44_2var.get())+' '+str(b44_3var.get())+' '+str(b44_4var.get())+' '+str(b44_5var.get())+' '+str(b44_7var.get())+' ')
    f.write (str(b45_0var.get())+' '+str(b45_1var.get())+' '+str(b45_2var.get())+' '+str(b45_3var.get())+' '+str(b45_4var.get())+' '+str(b45_5var.get())+' '+str(b45_7var.get())+' ')
    f.write (str(b46_0var.get())+' '+str(b46_1var.get())+' '+str(b46_2var.get())+' '+str(b46_3var.get())+' '+str(b46_4var.get())+' '+str(b46_5var.get())+' '+str(b46_7var.get())+' ')
    f.write (str(b47_0var.get())+' '+str(b47_1var.get())+' '+str(b47_2var.get())+' '+str(b47_3var.get())+' '+str(b47_4var.get())+' '+str(b47_5var.get())+' '+str(b47_7var.get())+' ')
    f.write (str(b48_0var.get())+' '+str(b48_1var.get())+' '+str(b48_2var.get())+' '+str(b48_3var.get())+' '+str(b48_4var.get())+' '+str(b48_5var.get())+' '+str(b48_7var.get())+' ')
    f.write (str(b49_0var.get())+' '+str(b49_1var.get())+' '+str(b49_2var.get())+' '+str(b49_3var.get())+' '+str(b49_4var.get())+' '+str(b49_5var.get())+' '+str(b49_7var.get())+' ')
    f.write (str(b50_0var.get())+' '+str(b50_1var.get())+' '+str(b50_2var.get())+' '+str(b50_3var.get())+' '+str(b50_4var.get())+' '+str(b50_5var.get())+' '+str(b50_7var.get())+' ')
    f.write (str(b51_0var.get())+' '+str(b51_1var.get())+' '+str(b51_2var.get())+' '+str(b51_3var.get())+' '+str(b51_4var.get())+' '+str(b51_5var.get())+' '+str(b51_7var.get())+' ')
    f.write (str(b52_0var.get())+' '+str(b52_1var.get())+' '+str(b52_2var.get())+' '+str(b52_3var.get())+' '+str(b52_4var.get())+' '+str(b52_5var.get())+' '+str(b52_7var.get())+' ')
    f.write (str(b53_0var.get())+' '+str(b53_1var.get())+' '+str(b53_2var.get())+' '+str(b53_3var.get())+' '+str(b53_4var.get())+' '+str(b53_5var.get())+' '+str(b53_7var.get())+' ')
    f.write (str(b54_0var.get())+' '+str(b54_1var.get())+' '+str(b54_2var.get())+' '+str(b54_3var.get())+' '+str(b54_4var.get())+' '+str(b54_5var.get())+' '+str(b54_7var.get())+' ')
    f.write (str(b55_0var.get())+' '+str(b55_1var.get())+' '+str(b55_2var.get())+' '+str(b55_3var.get())+' '+str(b55_4var.get())+' '+str(b55_5var.get())+' '+str(b55_7var.get())+' ')
    f.write (str(b56_0var.get())+' '+str(b56_1var.get())+' '+str(b56_2var.get())+' '+str(b56_3var.get())+' '+str(b56_4var.get())+' '+str(b56_5var.get())+' '+str(b56_7var.get())+' ')
    f.write (str(b57_0var.get())+' '+str(b57_1var.get())+' '+str(b57_2var.get())+' '+str(b57_3var.get())+' '+str(b57_4var.get())+' '+str(b57_5var.get())+' '+str(b57_7var.get())+' ')
    f.write (str(b58_0var.get())+' '+str(b58_1var.get())+' '+str(b58_2var.get())+' '+str(b58_3var.get())+' '+str(b58_4var.get())+' '+str(b58_5var.get())+' '+str(b58_7var.get())+' ')
    f.write (str(b59_0var.get())+' '+str(b59_1var.get())+' '+str(b59_2var.get())+' '+str(b59_3var.get())+' '+str(b59_4var.get())+' '+str(b59_5var.get())+' '+str(b59_7var.get())+' ')
    f.write (str(b60_0var.get())+' '+str(b60_1var.get())+' '+str(b60_2var.get())+' '+str(b60_3var.get())+' '+str(b60_4var.get())+' '+str(b60_5var.get())+' '+str(b60_7var.get())+' ')
    f.write (str(b61_0var.get())+' '+str(b61_1var.get())+' '+str(b61_2var.get())+' '+str(b61_3var.get())+' '+str(b61_4var.get())+' '+str(b61_5var.get())+' '+str(b61_7var.get())+' ')
    f.write (str(b62_0var.get())+' '+str(b62_1var.get())+' '+str(b62_2var.get())+' '+str(b62_3var.get())+' '+str(b62_4var.get())+' '+str(b62_5var.get())+' '+str(b62_7var.get())+' ')
    f.write (str(b63_0var.get())+' '+str(b63_1var.get())+' '+str(b63_2var.get())+' '+str(b63_3var.get())+' '+str(b63_4var.get())+' '+str(b63_5var.get())+' '+str(b63_7var.get())+' ')
    f.write (str(b64_0var.get())+' '+str(b64_1var.get())+' '+str(b64_2var.get())+' '+str(b64_3var.get())+' '+str(b64_4var.get())+' '+str(b64_5var.get())+' '+str(b64_7var.get())+' ')
    f.write (str(b65_0var.get())+' '+str(b65_1var.get())+' '+str(b65_2var.get())+' '+str(b65_3var.get())+' '+str(b65_4var.get())+' '+str(b65_5var.get())+' '+str(b65_7var.get())+' ')
    f.write (str(b66_0var.get())+' '+str(b66_1var.get())+' '+str(b66_2var.get())+' '+str(b66_3var.get())+' '+str(b66_4var.get())+' '+str(b66_5var.get())+' '+str(b66_7var.get())+' ')
    f.write (str(b67_0var.get())+' '+str(b67_1var.get())+' '+str(b67_2var.get())+' '+str(b67_3var.get())+' '+str(b67_4var.get())+' '+str(b67_5var.get())+' '+str(b67_7var.get())+' ')
    f.write (str(b68_0var.get())+' '+str(b68_1var.get())+' '+str(b68_2var.get())+' '+str(b68_3var.get())+' '+str(b68_4var.get())+' '+str(b68_5var.get())+' '+str(b68_7var.get())+' ')
    f.write (str(b69_0var.get())+' '+str(b69_1var.get())+' '+str(b69_2var.get())+' '+str(b69_3var.get())+' '+str(b69_4var.get())+' '+str(b69_5var.get())+' '+str(b69_7var.get())+' ')
    f.write (str(b70_0var.get())+' '+str(b70_1var.get())+' '+str(b70_2var.get())+' '+str(b70_3var.get())+' '+str(b70_4var.get())+' '+str(b70_5var.get())+' '+str(b70_7var.get())+' ')
    f.write (str(b71_0var.get())+' '+str(b71_1var.get())+' '+str(b71_2var.get())+' '+str(b71_3var.get())+' '+str(b71_4var.get())+' '+str(b71_5var.get())+' '+str(b71_7var.get())+' ')
    f.write (str(b72_0var.get())+' '+str(b72_1var.get())+' '+str(b72_2var.get())+' '+str(b72_3var.get())+' '+str(b72_4var.get())+' '+str(b72_5var.get())+' '+str(b72_7var.get())+' ')
    f.write (str(b73_0var.get())+' '+str(b73_1var.get())+' '+str(b73_2var.get())+' '+str(b73_3var.get())+' '+str(b73_4var.get())+' '+str(b73_5var.get())+' '+str(b73_7var.get())+' ')
    f.write (str(b74_0var.get())+' '+str(b74_1var.get())+' '+str(b74_2var.get())+' '+str(b74_3var.get())+' '+str(b74_4var.get())+' '+str(b74_5var.get())+' '+str(b74_7var.get())+' ')
    f.write (str(b75_0var.get())+' '+str(b75_1var.get())+' '+str(b75_2var.get())+' '+str(b75_3var.get())+' '+str(b75_4var.get())+' '+str(b75_5var.get())+' '+str(b75_7var.get())+' ')
    f.write (str(b76_0var.get())+' '+str(b76_1var.get())+' '+str(b76_2var.get())+' '+str(b76_3var.get())+' '+str(b76_4var.get())+' '+str(b76_5var.get())+' '+str(b76_7var.get())+' ')
    f.write (str(b77_0var.get())+' '+str(b77_1var.get())+' '+str(b77_2var.get())+' '+str(b77_3var.get())+' '+str(b77_4var.get())+' '+str(b77_5var.get())+' '+str(b77_7var.get())+' ')
    f.write (str(b78_0var.get())+' '+str(b78_1var.get())+' '+str(b78_2var.get())+' '+str(b78_3var.get())+' '+str(b78_4var.get())+' '+str(b78_5var.get())+' '+str(b78_7var.get())+' ')
    f.write (str(b79_0var.get())+' '+str(b79_1var.get())+' '+str(b79_2var.get())+' '+str(b79_3var.get())+' '+str(b79_4var.get())+' '+str(b79_5var.get())+' '+str(b79_7var.get())+' ')
    f.write (str(b80_0var.get())+' '+str(b80_1var.get())+' '+str(b80_2var.get())+' '+str(b80_3var.get())+' '+str(b80_4var.get())+' '+str(b80_5var.get())+' '+str(b80_7var.get())+' ')
    f.write (str(b81_0var.get())+' '+str(b81_1var.get())+' '+str(b81_2var.get())+' '+str(b81_3var.get())+' '+str(b81_4var.get())+' '+str(b81_5var.get())+' '+str(b81_7var.get())+' ')
    f.write (str(b82_0var.get())+' '+str(b82_1var.get())+' '+str(b82_2var.get())+' '+str(b82_3var.get())+' '+str(b82_4var.get())+' '+str(b82_5var.get())+' '+str(b82_7var.get())+' ')
    f.write (str(b83_0var.get())+' '+str(b83_1var.get())+' '+str(b83_2var.get())+' '+str(b83_3var.get())+' '+str(b83_4var.get())+' '+str(b83_5var.get())+' '+str(b83_7var.get())+' ')
    f.write (str(b84_0var.get())+' '+str(b84_1var.get())+' '+str(b84_2var.get())+' '+str(b84_3var.get())+' '+str(b84_4var.get())+' '+str(b84_5var.get())+' '+str(b84_7var.get())+' ')
    f.write (str(b85_0var.get())+' '+str(b85_1var.get())+' '+str(b85_2var.get())+' '+str(b85_3var.get())+' '+str(b85_4var.get())+' '+str(b85_5var.get())+' '+str(b85_7var.get())+' ')
    f.write (str(b86_0var.get())+' '+str(b86_1var.get())+' '+str(b86_2var.get())+' '+str(b86_3var.get())+' '+str(b86_4var.get())+' '+str(b86_5var.get())+' '+str(b86_7var.get())+' ')
    f.write (str(b87_0var.get())+' '+str(b87_1var.get())+' '+str(b87_2var.get())+' '+str(b87_3var.get())+' '+str(b87_4var.get())+' '+str(b87_5var.get())+' '+str(b87_7var.get())+' ')
    f.write (str(b88_0var.get())+' '+str(b88_1var.get())+' '+str(b88_2var.get())+' '+str(b88_3var.get())+' '+str(b88_4var.get())+' '+str(b88_5var.get())+' '+str(b88_7var.get())+' ')
    f.write (str(b89_0var.get())+' '+str(b89_1var.get())+' '+str(b89_2var.get())+' '+str(b89_3var.get())+' '+str(b89_4var.get())+' '+str(b89_5var.get())+' '+str(b89_7var.get())+' ')
    f.write (str(b90_0var.get())+' '+str(b90_1var.get())+' '+str(b90_2var.get())+' '+str(b90_3var.get())+' '+str(b90_4var.get())+' '+str(b90_5var.get())+' '+str(b90_7var.get())+' ')
    f.write (str(b91_0var.get())+' '+str(b91_1var.get())+' '+str(b91_2var.get())+' '+str(b91_3var.get())+' '+str(b91_4var.get())+' '+str(b91_5var.get())+' '+str(b91_7var.get())+' ')
    f.write (str(b92_0var.get())+' '+str(b92_1var.get())+' '+str(b92_2var.get())+' '+str(b92_3var.get())+' '+str(b92_4var.get())+' '+str(b92_5var.get())+' '+str(b92_7var.get())+' ')
    f.write (str(b93_0var.get())+' '+str(b93_1var.get())+' '+str(b93_2var.get())+' '+str(b93_3var.get())+' '+str(b93_4var.get())+' '+str(b93_5var.get())+' '+str(b93_7var.get())+' ')
    f.write (str(b94_0var.get())+' '+str(b94_1var.get())+' '+str(b94_2var.get())+' '+str(b94_3var.get())+' '+str(b94_4var.get())+' '+str(b94_5var.get())+' '+str(b94_7var.get())+' ')
    f.write (str(b95_0var.get())+' '+str(b95_1var.get())+' '+str(b95_2var.get())+' '+str(b95_3var.get())+' '+str(b95_4var.get())+' '+str(b95_5var.get())+' '+str(b95_7var.get())+' ')
    f.write (str(loop_var.get())+' '+str(speed0)+' '+str(speed1)+' '+str(speed2)+' '+str(speed3)+' '+str(speed4)+' '+str(speed5)+' '+str(speed6)+' '+str(speed7)+' ')
    f.write (str(speed8)+' '+str(speed9)+' '+str(speed10)+' '+str(speed11)+' '+str(speed12)+' '+str(speed13)+' '+str(speed14)+' '+str(speed15)+' ')
    f.write (str(speed16)+' '+str(speed17)+' '+str(speed18)+' '+str(speed19)+' '+str(speed20)+' '+str(speed21)+' '+str(speed22)+' '+str(speed23)+' ')
    f.write (str(speed24)+' '+str(speed25)+' '+str(speed26)+' '+str(speed27)+' '+str(speed28)+' '+str(speed29)+' '+str(speed30)+' '+str(speed31)+' ')
    f.write (str(speed32)+' '+str(speed33)+' '+str(speed34)+' '+str(speed35)+' '+str(speed36)+' '+str(speed37)+' '+str(speed38)+' '+str(speed39)+' ')
    f.write (str(speed40)+' '+str(speed41)+' '+str(speed42)+' '+str(speed43)+' '+str(speed44)+' '+str(speed45)+' '+str(speed46)+' '+str(speed47)+' ')
    f.write (str(speed48)+' '+str(speed49)+' '+str(speed50)+' '+str(speed51)+' '+str(speed52)+' '+str(speed53)+' '+str(speed54)+' '+str(speed55)+' ')
    f.write (str(speed56)+' '+str(speed57)+' '+str(speed58)+' '+str(speed59)+' '+str(speed60)+' '+str(speed61)+' '+str(speed62)+' '+str(speed63)+' ')
    f.write (str(speed64)+' '+str(speed65)+' '+str(speed66)+' '+str(speed67)+' '+str(speed68)+' '+str(speed69)+' '+str(speed70)+' '+str(speed71)+' ')
    f.write (str(speed72)+' '+str(speed73)+' '+str(speed74)+' '+str(speed75)+' '+str(speed76)+' '+str(speed77)+' '+str(speed78)+' '+str(speed79)+' ')
    f.write (str(speed80)+' '+str(speed81)+' '+str(speed82)+' '+str(speed83)+' '+str(speed84)+' '+str(speed85)+' '+str(speed86)+' '+str(speed87)+' ')
    f.write (str(speed88)+' '+str(speed89)+' '+str(speed90)+' '+str(speed91)+' '+str(speed92)+' '+str(speed93)+' '+str(speed94)+' '+str(speed95)+' ')
    f.write (str(repeat)+' '+str(loop))
    f.close()


class AutoScrollbar(Scrollbar):

    def set(self, lo, hi):
        if float(lo) <= 0.0 and float(hi) >= 1.0:
            self.tk.call("grid", "remove", self)
        else:
            self.grid()
        Scrollbar.set(self, lo, hi)
    def pack(self, **kw):
        raise TclError("cannot use pack with this widget")
    def place(self, **kw):
        raise TclError("cannot use place with this widget")


root = Tk()

vscrollbar = AutoScrollbar(root)
vscrollbar.grid(row=0, column=1, sticky=N+S)
hscrollbar = AutoScrollbar(root, orient=HORIZONTAL)
hscrollbar.grid(row=1, column=0, sticky=E+W)

canvas = Canvas(root, yscrollcommand=vscrollbar.set, xscrollcommand=hscrollbar.set)
canvas.grid(row=0, column=0, sticky=N+S+E+W)

vscrollbar.config(command=canvas.yview)
hscrollbar.config(command=canvas.xview)

# make the canvas expandable
root.grid_rowconfigure(0, weight=1)
root.grid_columnconfigure(0, weight=1)


# create canvas contents
content = Frame(canvas)
content.rowconfigure(1, weight=1)
content.columnconfigure(1, weight=1)


#for displaying speed
show_speed0 = StringVar()
show_speed0.set('0.5')
show_speed1 = StringVar()
show_speed1.set('0.5')
show_speed2 = StringVar()
show_speed2.set('0.5')
show_speed3 = StringVar()
show_speed3.set('0.5')
show_speed4 = StringVar()
show_speed4.set('0.5')
show_speed5 = StringVar()
show_speed5.set('0.5')
show_speed6 = StringVar()
show_speed6.set('0.5')
show_speed7 = StringVar()
show_speed7.set('0.5')
show_speed8 = StringVar()
show_speed8.set('0.5')
show_speed9 = StringVar()
show_speed9.set('0.5')
show_speed10 = StringVar()
show_speed10.set('0.5')
show_speed11 = StringVar()
show_speed11.set('0.5')
show_speed12 = StringVar()
show_speed12.set('0.5')
show_speed13 = StringVar()
show_speed13.set('0.5')
show_speed14 = StringVar()
show_speed14.set('0.5')
show_speed15 = StringVar()
show_speed15.set('0.5')
show_speed16 = StringVar()
show_speed16.set('0.5')
show_speed17 = StringVar()
show_speed17.set('0.5')
show_speed18 = StringVar()
show_speed18.set('0.5')
show_speed19 = StringVar()
show_speed19.set('0.5')
show_speed20 = StringVar()
show_speed20.set('0.5')
show_speed21 = StringVar()
show_speed21.set('0.5')
show_speed22 = StringVar()
show_speed22.set('0.5')
show_speed23 = StringVar()
show_speed23.set('0.5')
show_speed24 = StringVar()
show_speed24.set('0.5')
show_speed25 = StringVar()
show_speed25.set('0.5')
show_speed26 = StringVar()
show_speed26.set('0.5')
show_speed27 = StringVar()
show_speed27.set('0.5')
show_speed28 = StringVar()
show_speed28.set('0.5')
show_speed29 = StringVar()
show_speed29.set('0.5')
show_speed30 = StringVar()
show_speed30.set('0.5')
show_speed31 = StringVar()
show_speed31.set('0.5')
show_speed32 = StringVar()
show_speed32.set('0.5')
show_speed33 = StringVar()
show_speed33.set('0.5')
show_speed34 = StringVar()
show_speed34.set('0.5')
show_speed35 = StringVar()
show_speed35.set('0.5')
show_speed36 = StringVar()
show_speed36.set('0.5')
show_speed37 = StringVar()
show_speed37.set('0.5')
show_speed38 = StringVar()
show_speed38.set('0.5')
show_speed39 = StringVar()
show_speed39.set('0.5')
show_speed40 = StringVar()
show_speed40.set('0.5')
show_speed41 = StringVar()
show_speed41.set('0.5')
show_speed42 = StringVar()
show_speed42.set('0.5')
show_speed43 = StringVar()
show_speed43.set('0.5')
show_speed44 = StringVar()
show_speed44.set('0.5')
show_speed45 = StringVar()
show_speed45.set('0.5')
show_speed46 = StringVar()
show_speed46.set('0.5')
show_speed47 = StringVar()
show_speed47.set('0.5')
show_speed48 = StringVar()
show_speed48.set('0.5')
show_speed49 = StringVar()
show_speed49.set('0.5')
show_speed50 = StringVar()
show_speed50.set('0.5')
show_speed51 = StringVar()
show_speed51.set('0.5')
show_speed52 = StringVar()
show_speed52.set('0.5')
show_speed53 = StringVar()
show_speed53.set('0.5')
show_speed54 = StringVar()
show_speed54.set('0.5')
show_speed55 = StringVar()
show_speed55.set('0.5')
show_speed56 = StringVar()
show_speed56.set('0.5')
show_speed57 = StringVar()
show_speed57.set('0.5')
show_speed58 = StringVar()
show_speed58.set('0.5')
show_speed59 = StringVar()
show_speed59.set('0.5')
show_speed60 = StringVar()
show_speed60.set('0.5')
show_speed61 = StringVar()
show_speed61.set('0.5')
show_speed62 = StringVar()
show_speed62.set('0.5')
show_speed63 = StringVar()
show_speed63.set('0.5')
show_speed64 = StringVar()
show_speed64.set('0.5')
show_speed65 = StringVar()
show_speed65.set('0.5')
show_speed66 = StringVar()
show_speed66.set('0.5')
show_speed67 = StringVar()
show_speed67.set('0.5')
show_speed68 = StringVar()
show_speed68.set('0.5')
show_speed69 = StringVar()
show_speed69.set('0.5')
show_speed70 = StringVar()
show_speed70.set('0.5')
show_speed71 = StringVar()
show_speed71.set('0.5')
show_speed72 = StringVar()
show_speed72.set('0.5')
show_speed73 = StringVar()
show_speed73.set('0.5')
show_speed74 = StringVar()
show_speed74.set('0.5')
show_speed75 = StringVar()
show_speed75.set('0.5')
show_speed76 = StringVar()
show_speed76.set('0.5')
show_speed77 = StringVar()
show_speed77.set('0.5')
show_speed78 = StringVar()
show_speed78.set('0.5')
show_speed79 = StringVar()
show_speed79.set('0.5')
show_speed80 = StringVar()
show_speed80.set('0.5')
show_speed81 = StringVar()
show_speed81.set('0.5')
show_speed82 = StringVar()
show_speed82.set('0.5')
show_speed83 = StringVar()
show_speed83.set('0.5')
show_speed84 = StringVar()
show_speed84.set('0.5')
show_speed85 = StringVar()
show_speed85.set('0.5')
show_speed86 = StringVar()
show_speed86.set('0.5')
show_speed87 = StringVar()
show_speed87.set('0.5')
show_speed88 = StringVar()
show_speed88.set('0.5')
show_speed89 = StringVar()
show_speed89.set('0.5')
show_speed90 = StringVar()
show_speed90.set('0.5')
show_speed91 = StringVar()
show_speed91.set('0.5')
show_speed92 = StringVar()
show_speed92.set('0.5')
show_speed93 = StringVar()
show_speed93.set('0.5')
show_speed94 = StringVar()
show_speed94.set('0.5')
show_speed95 = StringVar()
show_speed95.set('0.5')


#for displaying repeat time
show_repeat = StringVar()
show_repeat.set('0.5')

# for showing number of loops
show_loop = StringVar()
show_loop.set('1')

#for note colour change
global c1
c1 = StringVar()


#defining stop box
stop_var = IntVar()
stop_var.set(0)
stop_0 = ttk.Checkbutton(content, text="STOP", variable=stop_var, onvalue=1, offvalue=0)
#stop_0.grid(column=27,row=12)

#defining loop box
loop_var = IntVar()
loop_var.set(0)
loop_0 = ttk.Checkbutton(content, command=toggle_inf, text="LOOP ON/OFF", variable=loop_var, onvalue=1, offvalue=0)
loop_0.grid(column=38,row=5)


# Group 1

# defining labels
nameb0_0 = ttk.Label(content, text="Note 1", background=c1.get())
nameb1_0 = ttk.Label(content, text="Note 2", background=c1.get())
nameb2_0 = ttk.Label(content, text="Note 3", background=c1.get())
nameb3_0 = ttk.Label(content, text="Note 4", background=c1.get())

# Defining number type
b0_0var = IntVar()
b0_1var = IntVar()
b0_2var = IntVar()
b0_3var = IntVar()
b0_4var = IntVar()
b0_5var = IntVar()
b0_6var = IntVar()
b0_7var = IntVar()

b1_0var = IntVar()
b1_1var = IntVar()
b1_2var = IntVar()
b1_3var = IntVar()
b1_4var = IntVar()
b1_5var = IntVar()
b1_7var = IntVar()

b2_0var = IntVar()
b2_1var = IntVar()
b2_2var = IntVar()
b2_3var = IntVar()
b2_4var = IntVar()
b2_5var = IntVar()
b2_7var = IntVar()

b3_0var = IntVar()
b3_1var = IntVar()
b3_2var = IntVar()
b3_3var = IntVar()
b3_4var = IntVar()
b3_5var = IntVar()
b3_7var = IntVar()

# setting default button position
b0_0var.set(0)
b0_1var.set(0)
b0_2var.set(0)
b0_3var.set(0)
b0_4var.set(0)
b0_5var.set(0)
b0_6var.set(0)
b0_7var.set(0)

b1_0var.set(0)
b1_1var.set(0)
b1_2var.set(0)
b1_3var.set(0)
b1_4var.set(0)
b1_5var.set(0)
b1_7var.set(0)

b2_0var.set(0)
b2_1var.set(0)
b2_2var.set(0)
b2_3var.set(0)
b2_4var.set(0)
b2_5var.set(0)
b2_7var.set(0)

b3_0var.set(0)
b3_1var.set(0)
b3_2var.set(0)
b3_3var.set(0)
b3_4var.set(0)
b3_5var.set(0)
b3_7var.set(0)

# defining button

b0_0 = ttk.Checkbutton(content, text="1", variable=b0_0var, onvalue=1, offvalue=0)
b0_1 = ttk.Checkbutton(content, text="2", variable=b0_1var, onvalue=1, offvalue=0)
b0_2 = ttk.Checkbutton(content, text="4", variable=b0_2var, onvalue=1, offvalue=0)
b0_3 = ttk.Checkbutton(content, text="8", variable=b0_3var, onvalue=1, offvalue=0)
b0_4 = ttk.Checkbutton(content, text="16", variable=b0_4var, onvalue=1, offvalue=0)
b0_5 = ttk.Checkbutton(content, text="32", variable=b0_5var, onvalue=1, offvalue=0)
b0_6 = ttk.Checkbutton(content, command=toggle_loop, text="INFINITE LOOP ON/OFF", variable=b0_6var, onvalue=1, offvalue=0)
b0_7 = ttk.Checkbutton(content, text="HALT", variable=b0_7var, onvalue=1, offvalue=0)

b1_0 = ttk.Checkbutton(content, text="1", variable=b1_0var, onvalue=1, offvalue=0)
b1_1 = ttk.Checkbutton(content, text="2", variable=b1_1var, onvalue=1, offvalue=0)
b1_2 = ttk.Checkbutton(content, text="4", variable=b1_2var, onvalue=1, offvalue=0)
b1_3 = ttk.Checkbutton(content, text="8", variable=b1_3var, onvalue=1, offvalue=0)
b1_4 = ttk.Checkbutton(content, text="16", variable=b1_4var, onvalue=1, offvalue=0)
b1_5 = ttk.Checkbutton(content, text="32", variable=b1_5var, onvalue=1, offvalue=0)
b1_7 = ttk.Checkbutton(content, text="HALT", variable=b1_7var, onvalue=1, offvalue=0)

b2_0 = ttk.Checkbutton(content, text="1", variable=b2_0var, onvalue=1, offvalue=0)
b2_1 = ttk.Checkbutton(content, text="2", variable=b2_1var, onvalue=1, offvalue=0)
b2_2 = ttk.Checkbutton(content, text="4", variable=b2_2var, onvalue=1, offvalue=0)
b2_3 = ttk.Checkbutton(content, text="8", variable=b2_3var, onvalue=1, offvalue=0)
b2_4 = ttk.Checkbutton(content, text="16", variable=b2_4var, onvalue=1, offvalue=0)
b2_5 = ttk.Checkbutton(content, text="32", variable=b2_5var, onvalue=1, offvalue=0)
b2_7 = ttk.Checkbutton(content, text="HALT", variable=b2_7var, onvalue=1, offvalue=0)

b3_0 = ttk.Checkbutton(content, text="1", variable=b3_0var, onvalue=1, offvalue=0)
b3_1 = ttk.Checkbutton(content, text="2", variable=b3_1var, onvalue=1, offvalue=0)
b3_2 = ttk.Checkbutton(content, text="4", variable=b3_2var, onvalue=1, offvalue=0)
b3_3 = ttk.Checkbutton(content, text="8", variable=b3_3var, onvalue=1, offvalue=0)
b3_4 = ttk.Checkbutton(content, text="16", variable=b3_4var, onvalue=1, offvalue=0)
b3_5 = ttk.Checkbutton(content, text="32", variable=b3_5var, onvalue=1, offvalue=0)
b3_7 = ttk.Checkbutton(content, text="HALT", variable=b3_7var, onvalue=1, offvalue=0)


content.grid(column=0, row=0)

# placing text above each byte
nameb0_0.grid(column=4, row=0, columnspan=2)
nameb1_0.grid(column=4, row=5, columnspan=2)
nameb2_0.grid(column=4, row=11, columnspan=2)
nameb3_0.grid(column=4, row=17, columnspan=2)
space0 = ttk.Label(content, width=5).grid(column=12, row=0, columnspan=1)
space1 = ttk.Label(content, width=2).grid(column=0, row=0, columnspan=1)
space2 = ttk.Label(content, width=5).grid(column=24, row=0, columnspan=1)
space3 = ttk.Label(content, width=5).grid(column=36, row=0, columnspan=1)
space4 = ttk.Label(content, width=2).grid(column=0, row=92)
space5 = ttk.Label(content, width=2).grid(column=0, row=94)

ttk.Style().configure('blue.TSeparator', background='blue')
sep = ttk.Separator(content, orient=HORIZONTAL, style='blue.TSeparator').grid(column=1, row=93, columnspan=35, sticky=EW)


# placing buttons on grid
b0_0.grid(column=1,row=3)
b0_1.grid(column=2,row=3)
b0_2.grid(column=3,row=3)
b0_3.grid(column=4,row=3)
b0_4.grid(column=5,row=3)
b0_5.grid(column=6,row=3, ipadx=10)
b0_6.grid(column=38,row=3)
b0_7.grid(column=8,row=3, ipadx=10)

b1_0.grid(column=1,row=6)
b1_1.grid(column=2,row=6)
b1_2.grid(column=3,row=6)
b1_3.grid(column=4,row=6)
b1_4.grid(column=5,row=6)
b1_5.grid(column=6,row=6, ipadx=10)
b1_7.grid(column=8,row=6, ipadx=10)

b2_0.grid(column=1,row=12)
b2_1.grid(column=2,row=12)
b2_2.grid(column=3,row=12)
b2_3.grid(column=4,row=12)
b2_4.grid(column=5,row=12)
b2_5.grid(column=6,row=12, ipadx=10)
b2_7.grid(column=8,row=12, ipadx=10)

b3_0.grid(column=1,row=18)
b3_1.grid(column=2,row=18)
b3_2.grid(column=3,row=18)
b3_3.grid(column=4,row=18)
b3_4.grid(column=5,row=18)
b3_5.grid(column=6,row=18, ipadx=10)
b3_7.grid(column=8,row=18, ipadx=10)


# Group 2

# defining labels
nameb4_0 = ttk.Label(content, text="Note 5", background=c1.get())
nameb5_0 = ttk.Label(content, text="Note 6", background=c1.get())
nameb6_0 = ttk.Label(content, text="Note 7", background=c1.get())
nameb7_0 = ttk.Label(content, text="Note 8", background=c1.get())


# Defining number type
b4_0var = IntVar()
b4_1var = IntVar()
b4_2var = IntVar()
b4_3var = IntVar()
b4_4var = IntVar()
b4_5var = IntVar()
b4_7var = IntVar()

b5_0var = IntVar()
b5_1var = IntVar()
b5_2var = IntVar()
b5_3var = IntVar()
b5_4var = IntVar()
b5_5var = IntVar()
b5_7var = IntVar()

b6_0var = IntVar()
b6_1var = IntVar()
b6_2var = IntVar()
b6_3var = IntVar()
b6_4var = IntVar()
b6_5var = IntVar()
b6_7var = IntVar()

b7_0var = IntVar()
b7_1var = IntVar()
b7_2var = IntVar()
b7_3var = IntVar()
b7_4var = IntVar()
b7_5var = IntVar()
b7_7var = IntVar()

# Setting default button position
b4_0var.set(0)
b4_1var.set(0)
b4_2var.set(0)
b4_3var.set(0)
b4_4var.set(0)
b4_5var.set(0)
b4_7var.set(0)

b5_0var.set(0)
b5_1var.set(0)
b5_2var.set(0)
b5_3var.set(0)
b5_4var.set(0)
b5_5var.set(0)
b5_7var.set(0)

b6_0var.set(0)
b6_1var.set(0)
b6_2var.set(0)
b6_3var.set(0)
b6_4var.set(0)
b6_5var.set(0)
b6_7var.set(0)

b7_0var.set(0)
b7_1var.set(0)
b7_2var.set(0)
b7_3var.set(0)
b7_4var.set(0)
b7_5var.set(0)
b7_7var.set(0)

# Defining button
b4_0 = ttk.Checkbutton(content, text="1", variable=b4_0var, onvalue=1, offvalue=0)
b4_1 = ttk.Checkbutton(content, text="2", variable=b4_1var, onvalue=1, offvalue=0)
b4_2 = ttk.Checkbutton(content, text="4", variable=b4_2var, onvalue=1, offvalue=0)
b4_3 = ttk.Checkbutton(content, text="8", variable=b4_3var, onvalue=1, offvalue=0)
b4_4 = ttk.Checkbutton(content, text="16", variable=b4_4var, onvalue=1, offvalue=0)
b4_5 = ttk.Checkbutton(content, text="32", variable=b4_5var, onvalue=1, offvalue=0)
b4_7 = ttk.Checkbutton(content, text="HALT", variable=b4_7var, onvalue=1, offvalue=0)

b5_0 = ttk.Checkbutton(content, text="1", variable=b5_0var, onvalue=1, offvalue=0)
b5_1 = ttk.Checkbutton(content, text="2", variable=b5_1var, onvalue=1, offvalue=0)
b5_2 = ttk.Checkbutton(content, text="4", variable=b5_2var, onvalue=1, offvalue=0)
b5_3 = ttk.Checkbutton(content, text="8", variable=b5_3var, onvalue=1, offvalue=0)
b5_4 = ttk.Checkbutton(content, text="16", variable=b5_4var, onvalue=1, offvalue=0)
b5_5 = ttk.Checkbutton(content, text="32", variable=b5_5var, onvalue=1, offvalue=0)
b5_7 = ttk.Checkbutton(content, text="HALT", variable=b5_7var, onvalue=1, offvalue=0)

b6_0 = ttk.Checkbutton(content, text="1", variable=b6_0var, onvalue=1, offvalue=0)
b6_1 = ttk.Checkbutton(content, text="2", variable=b6_1var, onvalue=1, offvalue=0)
b6_2 = ttk.Checkbutton(content, text="4", variable=b6_2var, onvalue=1, offvalue=0)
b6_3 = ttk.Checkbutton(content, text="8", variable=b6_3var, onvalue=1, offvalue=0)
b6_4 = ttk.Checkbutton(content, text="16", variable=b6_4var, onvalue=1, offvalue=0)
b6_5 = ttk.Checkbutton(content, text="32", variable=b6_5var, onvalue=1, offvalue=0)
b6_7 = ttk.Checkbutton(content, text="HALT", variable=b6_7var, onvalue=1, offvalue=0)

b7_0 = ttk.Checkbutton(content, text="1", variable=b7_0var, onvalue=1, offvalue=0)
b7_1 = ttk.Checkbutton(content, text="2", variable=b7_1var, onvalue=1, offvalue=0)
b7_2 = ttk.Checkbutton(content, text="4", variable=b7_2var, onvalue=1, offvalue=0)
b7_3 = ttk.Checkbutton(content, text="8", variable=b7_3var, onvalue=1, offvalue=0)
b7_4 = ttk.Checkbutton(content, text="16", variable=b7_4var, onvalue=1, offvalue=0)
b7_5 = ttk.Checkbutton(content, text="32", variable=b7_5var, onvalue=1, offvalue=0)
b7_7 = ttk.Checkbutton(content, text="HALT", variable=b7_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb4_0.grid(column=4, row=23, columnspan=2)
nameb5_0.grid(column=4, row=29, columnspan=2)
nameb6_0.grid(column=4, row=35, columnspan=2)
nameb7_0.grid(column=4, row=41, columnspan=2)

# Placing buttons on grid
b4_0.grid(column=1,row=24)
b4_1.grid(column=2,row=24)
b4_2.grid(column=3,row=24)
b4_3.grid(column=4,row=24)
b4_4.grid(column=5,row=24)
b4_5.grid(column=6,row=24, ipadx=10)
b4_7.grid(column=8,row=24, ipadx=10)

b5_0.grid(column=1,row=30)
b5_1.grid(column=2,row=30)
b5_2.grid(column=3,row=30)
b5_3.grid(column=4,row=30)
b5_4.grid(column=5,row=30)
b5_5.grid(column=6,row=30, ipadx=10)
b5_7.grid(column=8,row=30, ipadx=10)

b6_0.grid(column=1,row=36)
b6_1.grid(column=2,row=36)
b6_2.grid(column=3,row=36)
b6_3.grid(column=4,row=36)
b6_4.grid(column=5,row=36)
b6_5.grid(column=6,row=36, ipadx=10)
b6_7.grid(column=8,row=36, ipadx=10)

b7_0.grid(column=1,row=42)
b7_1.grid(column=2,row=42)
b7_2.grid(column=3,row=42)
b7_3.grid(column=4,row=42)
b7_4.grid(column=5,row=42)
b7_5.grid(column=6,row=42, ipadx=10)
b7_7.grid(column=8,row=42, ipadx=10)

# Group 3

# defining labels
nameb8_0 = ttk.Label(content, text="Note 9", background=c1.get())
nameb9_0 = ttk.Label(content, text="Note 10", background=c1.get())
nameb10_0 = ttk.Label(content, text="Note 11", background=c1.get())
nameb11_0 = ttk.Label(content, text="Note 12", background=c1.get())


# Defining number type
b8_0var = IntVar()
b8_1var = IntVar()
b8_2var = IntVar()
b8_3var = IntVar()
b8_4var = IntVar()
b8_5var = IntVar()
b8_7var = IntVar()

b9_0var = IntVar()
b9_1var = IntVar()
b9_2var = IntVar()
b9_3var = IntVar()
b9_4var = IntVar()
b9_5var = IntVar()
b9_7var = IntVar()

b10_0var = IntVar()
b10_1var = IntVar()
b10_2var = IntVar()
b10_3var = IntVar()
b10_4var = IntVar()
b10_5var = IntVar()
b10_7var = IntVar()

b11_0var = IntVar()
b11_1var = IntVar()
b11_2var = IntVar()
b11_3var = IntVar()
b11_4var = IntVar()
b11_5var = IntVar()
b11_7var = IntVar()

# Setting default button position
b8_0var.set(0)
b8_1var.set(0)
b8_2var.set(0)
b8_3var.set(0)
b8_4var.set(0)
b8_5var.set(0)
b8_7var.set(0)

b9_0var.set(0)
b9_1var.set(0)
b9_2var.set(0)
b9_3var.set(0)
b9_4var.set(0)
b9_5var.set(0)
b9_7var.set(0)

b10_0var.set(0)
b10_1var.set(0)
b10_2var.set(0)
b10_3var.set(0)
b10_4var.set(0)
b10_5var.set(0)
b10_7var.set(0)

b11_0var.set(0)
b11_1var.set(0)
b11_2var.set(0)
b11_3var.set(0)
b11_4var.set(0)
b11_5var.set(0)
b11_7var.set(0)

# Defining button
b8_0 = ttk.Checkbutton(content, text="1", variable=b8_0var, onvalue=1, offvalue=0)
b8_1 = ttk.Checkbutton(content, text="2", variable=b8_1var, onvalue=1, offvalue=0)
b8_2 = ttk.Checkbutton(content, text="4", variable=b8_2var, onvalue=1, offvalue=0)
b8_3 = ttk.Checkbutton(content, text="8", variable=b8_3var, onvalue=1, offvalue=0)
b8_4 = ttk.Checkbutton(content, text="16", variable=b8_4var, onvalue=1, offvalue=0)
b8_5 = ttk.Checkbutton(content, text="32", variable=b8_5var, onvalue=1, offvalue=0)
b8_7 = ttk.Checkbutton(content, text="HALT", variable=b8_7var, onvalue=1, offvalue=0)

b9_0 = ttk.Checkbutton(content, text="1", variable=b9_0var, onvalue=1, offvalue=0)
b9_1 = ttk.Checkbutton(content, text="2", variable=b9_1var, onvalue=1, offvalue=0)
b9_2 = ttk.Checkbutton(content, text="4", variable=b9_2var, onvalue=1, offvalue=0)
b9_3 = ttk.Checkbutton(content, text="8", variable=b9_3var, onvalue=1, offvalue=0)
b9_4 = ttk.Checkbutton(content, text="16", variable=b9_4var, onvalue=1, offvalue=0)
b9_5 = ttk.Checkbutton(content, text="32", variable=b9_5var, onvalue=1, offvalue=0)
b9_7 = ttk.Checkbutton(content, text="HALT", variable=b9_7var, onvalue=1, offvalue=0)

b10_0 = ttk.Checkbutton(content, text="1", variable=b10_0var, onvalue=1, offvalue=0)
b10_1 = ttk.Checkbutton(content, text="2", variable=b10_1var, onvalue=1, offvalue=0)
b10_2 = ttk.Checkbutton(content, text="4", variable=b10_2var, onvalue=1, offvalue=0)
b10_3 = ttk.Checkbutton(content, text="8", variable=b10_3var, onvalue=1, offvalue=0)
b10_4 = ttk.Checkbutton(content, text="16", variable=b10_4var, onvalue=1, offvalue=0)
b10_5 = ttk.Checkbutton(content, text="32", variable=b10_5var, onvalue=1, offvalue=0)
b10_7 = ttk.Checkbutton(content, text="HALT", variable=b10_7var, onvalue=1, offvalue=0)

b11_0 = ttk.Checkbutton(content, text="1", variable=b11_0var, onvalue=1, offvalue=0)
b11_1 = ttk.Checkbutton(content, text="2", variable=b11_1var, onvalue=1, offvalue=0)
b11_2 = ttk.Checkbutton(content, text="4", variable=b11_2var, onvalue=1, offvalue=0)
b11_3 = ttk.Checkbutton(content, text="8", variable=b11_3var, onvalue=1, offvalue=0)
b11_4 = ttk.Checkbutton(content, text="16", variable=b11_4var, onvalue=1, offvalue=0)
b11_5 = ttk.Checkbutton(content, text="32", variable=b11_5var, onvalue=1, offvalue=0)
b11_7 = ttk.Checkbutton(content, text="HALT", variable=b11_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb8_0.grid(column=4, row=47, columnspan=2)
nameb9_0.grid(column=4, row=53, columnspan=2)
nameb10_0.grid(column=4, row=59, columnspan=2)
nameb11_0.grid(column=4, row=65, columnspan=2)

# Placing buttons on grid
b8_0.grid(column=1,row=48)
b8_1.grid(column=2,row=48)
b8_2.grid(column=3,row=48)
b8_3.grid(column=4,row=48)
b8_4.grid(column=5,row=48)
b8_5.grid(column=6,row=48, ipadx=10)
b8_7.grid(column=8,row=48, ipadx=10)

b9_0.grid(column=1,row=54)
b9_1.grid(column=2,row=54)
b9_2.grid(column=3,row=54)
b9_3.grid(column=4,row=54)
b9_4.grid(column=5,row=54)
b9_5.grid(column=6,row=54, ipadx=10)
b9_7.grid(column=8,row=54, ipadx=10)

b10_0.grid(column=1,row=60)
b10_1.grid(column=2,row=60)
b10_2.grid(column=3,row=60)
b10_3.grid(column=4,row=60)
b10_4.grid(column=5,row=60)
b10_5.grid(column=6,row=60, ipadx=10)
b10_7.grid(column=8,row=60, ipadx=10)

b11_0.grid(column=1,row=66)
b11_1.grid(column=2,row=66)
b11_2.grid(column=3,row=66)
b11_3.grid(column=4,row=66)
b11_4.grid(column=5,row=66)
b11_5.grid(column=6,row=66, ipadx=10)
b11_7.grid(column=8,row=66, ipadx=10)

# Group 4

# defining labels
nameb12_0 = ttk.Label(content, text="Note 13", background=c1.get())
nameb13_0 = ttk.Label(content, text="Note 14", background=c1.get())
nameb14_0 = ttk.Label(content, text="Note 15", background=c1.get())
nameb15_0 = ttk.Label(content, text="Note 16", background=c1.get())


# Defining number type
b12_0var = IntVar()
b12_1var = IntVar()
b12_2var = IntVar()
b12_3var = IntVar()
b12_4var = IntVar()
b12_5var = IntVar()
b12_7var = IntVar()

b13_0var = IntVar()
b13_1var = IntVar()
b13_2var = IntVar()
b13_3var = IntVar()
b13_4var = IntVar()
b13_5var = IntVar()
b13_7var = IntVar()

b14_0var = IntVar()
b14_1var = IntVar()
b14_2var = IntVar()
b14_3var = IntVar()
b14_4var = IntVar()
b14_5var = IntVar()
b14_7var = IntVar()

b15_0var = IntVar()
b15_1var = IntVar()
b15_2var = IntVar()
b15_3var = IntVar()
b15_4var = IntVar()
b15_5var = IntVar()
b15_7var = IntVar()

# Setting default button position
b12_0var.set(0)
b12_1var.set(0)
b12_2var.set(0)
b12_3var.set(0)
b12_4var.set(0)
b12_5var.set(0)
b12_7var.set(0)

b13_0var.set(0)
b13_1var.set(0)
b13_2var.set(0)
b13_3var.set(0)
b13_4var.set(0)
b13_5var.set(0)
b13_7var.set(0)

b14_0var.set(0)
b14_1var.set(0)
b14_2var.set(0)
b14_3var.set(0)
b14_4var.set(0)
b14_5var.set(0)
b14_7var.set(0)

b15_0var.set(0)
b15_1var.set(0)
b15_2var.set(0)
b15_3var.set(0)
b15_4var.set(0)
b15_5var.set(0)
b15_7var.set(0)

# Defining button
b12_0 = ttk.Checkbutton(content, text="1", variable=b12_0var, onvalue=1, offvalue=0)
b12_1 = ttk.Checkbutton(content, text="2", variable=b12_1var, onvalue=1, offvalue=0)
b12_2 = ttk.Checkbutton(content, text="4", variable=b12_2var, onvalue=1, offvalue=0)
b12_3 = ttk.Checkbutton(content, text="8", variable=b12_3var, onvalue=1, offvalue=0)
b12_4 = ttk.Checkbutton(content, text="16", variable=b12_4var, onvalue=1, offvalue=0)
b12_5 = ttk.Checkbutton(content, text="32", variable=b12_5var, onvalue=1, offvalue=0)
b12_7 = ttk.Checkbutton(content, text="HALT", variable=b12_7var, onvalue=1, offvalue=0)

b13_0 = ttk.Checkbutton(content, text="1", variable=b13_0var, onvalue=1, offvalue=0)
b13_1 = ttk.Checkbutton(content, text="2", variable=b13_1var, onvalue=1, offvalue=0)
b13_2 = ttk.Checkbutton(content, text="4", variable=b13_2var, onvalue=1, offvalue=0)
b13_3 = ttk.Checkbutton(content, text="8", variable=b13_3var, onvalue=1, offvalue=0)
b13_4 = ttk.Checkbutton(content, text="16", variable=b13_4var, onvalue=1, offvalue=0)
b13_5 = ttk.Checkbutton(content, text="32", variable=b13_5var, onvalue=1, offvalue=0)
b13_7 = ttk.Checkbutton(content, text="HALT", variable=b13_7var, onvalue=1, offvalue=0)

b14_0 = ttk.Checkbutton(content, text="1", variable=b14_0var, onvalue=1, offvalue=0)
b14_1 = ttk.Checkbutton(content, text="2", variable=b14_1var, onvalue=1, offvalue=0)
b14_2 = ttk.Checkbutton(content, text="4", variable=b14_2var, onvalue=1, offvalue=0)
b14_3 = ttk.Checkbutton(content, text="8", variable=b14_3var, onvalue=1, offvalue=0)
b14_4 = ttk.Checkbutton(content, text="16", variable=b14_4var, onvalue=1, offvalue=0)
b14_5 = ttk.Checkbutton(content, text="32", variable=b14_5var, onvalue=1, offvalue=0)
b14_7 = ttk.Checkbutton(content, text="HALT", variable=b14_7var, onvalue=1, offvalue=0)

b15_0 = ttk.Checkbutton(content, text="1", variable=b15_0var, onvalue=1, offvalue=0)
b15_1 = ttk.Checkbutton(content, text="2", variable=b15_1var, onvalue=1, offvalue=0)
b15_2 = ttk.Checkbutton(content, text="4", variable=b15_2var, onvalue=1, offvalue=0)
b15_3 = ttk.Checkbutton(content, text="8", variable=b15_3var, onvalue=1, offvalue=0)
b15_4 = ttk.Checkbutton(content, text="16", variable=b15_4var, onvalue=1, offvalue=0)
b15_5 = ttk.Checkbutton(content, text="32", variable=b15_5var, onvalue=1, offvalue=0)
b15_7 = ttk.Checkbutton(content, text="HALT", variable=b15_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb12_0.grid(column=4, row=71, columnspan=2)
nameb13_0.grid(column=4, row=77, columnspan=2)
nameb14_0.grid(column=4, row=83, columnspan=2)
nameb15_0.grid(column=4, row=89, columnspan=2)


# Placing buttons on grid
b12_0.grid(column=1,row=72)
b12_1.grid(column=2,row=72)
b12_2.grid(column=3,row=72)
b12_3.grid(column=4,row=72)
b12_4.grid(column=5,row=72)
b12_5.grid(column=6,row=72, ipadx=10)
b12_7.grid(column=8,row=72, ipadx=10)

b13_0.grid(column=1,row=78)
b13_1.grid(column=2,row=78)
b13_2.grid(column=3,row=78)
b13_3.grid(column=4,row=78)
b13_4.grid(column=5,row=78)
b13_5.grid(column=6,row=78, ipadx=10)
b13_7.grid(column=8,row=78, ipadx=10)

b14_0.grid(column=1,row=84)
b14_1.grid(column=2,row=84)
b14_2.grid(column=3,row=84)
b14_3.grid(column=4,row=84)
b14_4.grid(column=5,row=84)
b14_5.grid(column=6,row=84, ipadx=10)
b14_7.grid(column=8,row=84, ipadx=10)

b15_0.grid(column=1,row=90)
b15_1.grid(column=2,row=90)
b15_2.grid(column=3,row=90)
b15_3.grid(column=4,row=90)
b15_4.grid(column=5,row=90)
b15_5.grid(column=6,row=90, ipadx=10)
b15_7.grid(column=8,row=90, ipadx=10)

# Group 5

# defining labels
nameb16_0 = ttk.Label(content, text="Note 17", background=c1.get())
nameb17_0 = ttk.Label(content, text="Note 18", background=c1.get())
nameb18_0 = ttk.Label(content, text="Note 19", background=c1.get())
nameb19_0 = ttk.Label(content, text="Note 20", background=c1.get())


# Defining number type
b16_0var = IntVar()
b16_1var = IntVar()
b16_2var = IntVar()
b16_3var = IntVar()
b16_4var = IntVar()
b16_5var = IntVar()
b16_7var = IntVar()

b17_0var = IntVar()
b17_1var = IntVar()
b17_2var = IntVar()
b17_3var = IntVar()
b17_4var = IntVar()
b17_5var = IntVar()
b17_7var = IntVar()

b18_0var = IntVar()
b18_1var = IntVar()
b18_2var = IntVar()
b18_3var = IntVar()
b18_4var = IntVar()
b18_5var = IntVar()
b18_7var = IntVar()

b19_0var = IntVar()
b19_1var = IntVar()
b19_2var = IntVar()
b19_3var = IntVar()
b19_4var = IntVar()
b19_5var = IntVar()
b19_7var = IntVar()

# Setting default button position
b16_0var.set(0)
b16_1var.set(0)
b16_2var.set(0)
b16_3var.set(0)
b16_4var.set(0)
b16_5var.set(0)
b16_7var.set(0)

b17_0var.set(0)
b17_1var.set(0)
b17_2var.set(0)
b17_3var.set(0)
b17_4var.set(0)
b17_5var.set(0)
b17_7var.set(0)

b18_0var.set(0)
b18_1var.set(0)
b18_2var.set(0)
b18_3var.set(0)
b18_4var.set(0)
b18_5var.set(0)
b18_7var.set(0)

b19_0var.set(0)
b19_1var.set(0)
b19_2var.set(0)
b19_3var.set(0)
b19_4var.set(0)
b19_5var.set(0)
b19_7var.set(0)

# Defining button
b16_0 = ttk.Checkbutton(content, text="1", variable=b16_0var, onvalue=1, offvalue=0)
b16_1 = ttk.Checkbutton(content, text="2", variable=b16_1var, onvalue=1, offvalue=0)
b16_2 = ttk.Checkbutton(content, text="4", variable=b16_2var, onvalue=1, offvalue=0)
b16_3 = ttk.Checkbutton(content, text="8", variable=b16_3var, onvalue=1, offvalue=0)
b16_4 = ttk.Checkbutton(content, text="16", variable=b16_4var, onvalue=1, offvalue=0)
b16_5 = ttk.Checkbutton(content, text="32", variable=b16_5var, onvalue=1, offvalue=0)
b16_7 = ttk.Checkbutton(content, text="HALT", variable=b16_7var, onvalue=1, offvalue=0)

b17_0 = ttk.Checkbutton(content, text="1", variable=b17_0var, onvalue=1, offvalue=0)
b17_1 = ttk.Checkbutton(content, text="2", variable=b17_1var, onvalue=1, offvalue=0)
b17_2 = ttk.Checkbutton(content, text="4", variable=b17_2var, onvalue=1, offvalue=0)
b17_3 = ttk.Checkbutton(content, text="8", variable=b17_3var, onvalue=1, offvalue=0)
b17_4 = ttk.Checkbutton(content, text="16", variable=b17_4var, onvalue=1, offvalue=0)
b17_5 = ttk.Checkbutton(content, text="32", variable=b17_5var, onvalue=1, offvalue=0)
b17_7 = ttk.Checkbutton(content, text="HALT", variable=b17_7var, onvalue=1, offvalue=0)

b18_0 = ttk.Checkbutton(content, text="1", variable=b18_0var, onvalue=1, offvalue=0)
b18_1 = ttk.Checkbutton(content, text="2", variable=b18_1var, onvalue=1, offvalue=0)
b18_2 = ttk.Checkbutton(content, text="4", variable=b18_2var, onvalue=1, offvalue=0)
b18_3 = ttk.Checkbutton(content, text="8", variable=b18_3var, onvalue=1, offvalue=0)
b18_4 = ttk.Checkbutton(content, text="16", variable=b18_4var, onvalue=1, offvalue=0)
b18_5 = ttk.Checkbutton(content, text="32", variable=b18_5var, onvalue=1, offvalue=0)
b18_7 = ttk.Checkbutton(content, text="HALT", variable=b18_7var, onvalue=1, offvalue=0)

b19_0 = ttk.Checkbutton(content, text="1", variable=b19_0var, onvalue=1, offvalue=0)
b19_1 = ttk.Checkbutton(content, text="2", variable=b19_1var, onvalue=1, offvalue=0)
b19_2 = ttk.Checkbutton(content, text="4", variable=b19_2var, onvalue=1, offvalue=0)
b19_3 = ttk.Checkbutton(content, text="8", variable=b19_3var, onvalue=1, offvalue=0)
b19_4 = ttk.Checkbutton(content, text="16", variable=b19_4var, onvalue=1, offvalue=0)
b19_5 = ttk.Checkbutton(content, text="32", variable=b19_5var, onvalue=1, offvalue=0)
b19_7 = ttk.Checkbutton(content, text="HALT", variable=b19_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb16_0.grid(column=16, row=0, columnspan=2)
nameb17_0.grid(column=16, row=5, columnspan=2)
nameb18_0.grid(column=16, row=11, columnspan=2)
nameb19_0.grid(column=16, row=17, columnspan=2)

# Placing buttons on grid
b16_0.grid(column=13,row=3)
b16_1.grid(column=14,row=3)
b16_2.grid(column=15,row=3)
b16_3.grid(column=16,row=3)
b16_4.grid(column=17,row=3)
b16_5.grid(column=18,row=3, ipadx=10)
b16_7.grid(column=20,row=3, ipadx=10)

b17_0.grid(column=13,row=6)
b17_1.grid(column=14,row=6)
b17_2.grid(column=15,row=6)
b17_3.grid(column=16,row=6)
b17_4.grid(column=17,row=6)
b17_5.grid(column=18,row=6, ipadx=10)
b17_7.grid(column=20,row=6, ipadx=10)

b18_0.grid(column=13,row=12)
b18_1.grid(column=14,row=12)
b18_2.grid(column=15,row=12)
b18_3.grid(column=16,row=12)
b18_4.grid(column=17,row=12)
b18_5.grid(column=18,row=12, ipadx=10)
b18_7.grid(column=20,row=12, ipadx=10)

b19_0.grid(column=13,row=18)
b19_1.grid(column=14,row=18)
b19_2.grid(column=15,row=18)
b19_3.grid(column=16,row=18)
b19_4.grid(column=17,row=18)
b19_5.grid(column=18,row=18, ipadx=10)
b19_7.grid(column=20,row=18, ipadx=10)

# Group 6

# defining labels
nameb20_0 = ttk.Label(content, text="Note 21", background=c1.get())
nameb21_0 = ttk.Label(content, text="Note 22", background=c1.get())
nameb22_0 = ttk.Label(content, text="Note 23", background=c1.get())
nameb23_0 = ttk.Label(content, text="Note 24", background=c1.get())


# Defining number type
b20_0var = IntVar()
b20_1var = IntVar()
b20_2var = IntVar()
b20_3var = IntVar()
b20_4var = IntVar()
b20_5var = IntVar()
b20_7var = IntVar()

b21_0var = IntVar()
b21_1var = IntVar()
b21_2var = IntVar()
b21_3var = IntVar()
b21_4var = IntVar()
b21_5var = IntVar()
b21_7var = IntVar()

b22_0var = IntVar()
b22_1var = IntVar()
b22_2var = IntVar()
b22_3var = IntVar()
b22_4var = IntVar()
b22_5var = IntVar()
b22_7var = IntVar()

b23_0var = IntVar()
b23_1var = IntVar()
b23_2var = IntVar()
b23_3var = IntVar()
b23_4var = IntVar()
b23_5var = IntVar()
b23_7var = IntVar()

# Setting default button position
b20_0var.set(0)
b20_1var.set(0)
b20_2var.set(0)
b20_3var.set(0)
b20_4var.set(0)
b20_5var.set(0)
b20_7var.set(0)

b21_0var.set(0)
b21_1var.set(0)
b21_2var.set(0)
b21_3var.set(0)
b21_4var.set(0)
b21_5var.set(0)
b21_7var.set(0)

b22_0var.set(0)
b22_1var.set(0)
b22_2var.set(0)
b22_3var.set(0)
b22_4var.set(0)
b22_5var.set(0)
b22_7var.set(0)

b23_0var.set(0)
b23_1var.set(0)
b23_2var.set(0)
b23_3var.set(0)
b23_4var.set(0)
b23_5var.set(0)
b23_7var.set(0)

# Defining button
b20_0 = ttk.Checkbutton(content, text="1", variable=b20_0var, onvalue=1, offvalue=0)
b20_1 = ttk.Checkbutton(content, text="2", variable=b20_1var, onvalue=1, offvalue=0)
b20_2 = ttk.Checkbutton(content, text="4", variable=b20_2var, onvalue=1, offvalue=0)
b20_3 = ttk.Checkbutton(content, text="8", variable=b20_3var, onvalue=1, offvalue=0)
b20_4 = ttk.Checkbutton(content, text="16", variable=b20_4var, onvalue=1, offvalue=0)
b20_5 = ttk.Checkbutton(content, text="32", variable=b20_5var, onvalue=1, offvalue=0)
b20_7 = ttk.Checkbutton(content, text="HALT", variable=b20_7var, onvalue=1, offvalue=0)

b21_0 = ttk.Checkbutton(content, text="1", variable=b21_0var, onvalue=1, offvalue=0)
b21_1 = ttk.Checkbutton(content, text="2", variable=b21_1var, onvalue=1, offvalue=0)
b21_2 = ttk.Checkbutton(content, text="4", variable=b21_2var, onvalue=1, offvalue=0)
b21_3 = ttk.Checkbutton(content, text="8", variable=b21_3var, onvalue=1, offvalue=0)
b21_4 = ttk.Checkbutton(content, text="16", variable=b21_4var, onvalue=1, offvalue=0)
b21_5 = ttk.Checkbutton(content, text="32", variable=b21_5var, onvalue=1, offvalue=0)
b21_7 = ttk.Checkbutton(content, text="HALT", variable=b21_7var, onvalue=1, offvalue=0)

b22_0 = ttk.Checkbutton(content, text="1", variable=b22_0var, onvalue=1, offvalue=0)
b22_1 = ttk.Checkbutton(content, text="2", variable=b22_1var, onvalue=1, offvalue=0)
b22_2 = ttk.Checkbutton(content, text="4", variable=b22_2var, onvalue=1, offvalue=0)
b22_3 = ttk.Checkbutton(content, text="8", variable=b22_3var, onvalue=1, offvalue=0)
b22_4 = ttk.Checkbutton(content, text="16", variable=b22_4var, onvalue=1, offvalue=0)
b22_5 = ttk.Checkbutton(content, text="32", variable=b22_5var, onvalue=1, offvalue=0)
b22_7 = ttk.Checkbutton(content, text="HALT", variable=b22_7var, onvalue=1, offvalue=0)

b23_0 = ttk.Checkbutton(content, text="1", variable=b23_0var, onvalue=1, offvalue=0)
b23_1 = ttk.Checkbutton(content, text="2", variable=b23_1var, onvalue=1, offvalue=0)
b23_2 = ttk.Checkbutton(content, text="4", variable=b23_2var, onvalue=1, offvalue=0)
b23_3 = ttk.Checkbutton(content, text="8", variable=b23_3var, onvalue=1, offvalue=0)
b23_4 = ttk.Checkbutton(content, text="16", variable=b23_4var, onvalue=1, offvalue=0)
b23_5 = ttk.Checkbutton(content, text="32", variable=b23_5var, onvalue=1, offvalue=0)
b23_7 = ttk.Checkbutton(content, text="HALT", variable=b23_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb20_0.grid(column=16, row=23, columnspan=2)
nameb21_0.grid(column=16, row=29, columnspan=2)
nameb22_0.grid(column=16, row=35, columnspan=2)
nameb23_0.grid(column=16, row=41, columnspan=2)

# Placing buttons on grid
b20_0.grid(column=13,row=24)
b20_1.grid(column=14,row=24)
b20_2.grid(column=15,row=24)
b20_3.grid(column=16,row=24)
b20_4.grid(column=17,row=24)
b20_5.grid(column=18,row=24, ipadx=10)
b20_7.grid(column=20,row=24, ipadx=10)

b21_0.grid(column=13,row=30)
b21_1.grid(column=14,row=30)
b21_2.grid(column=15,row=30)
b21_3.grid(column=16,row=30)
b21_4.grid(column=17,row=30)
b21_5.grid(column=18,row=30, ipadx=10)
b21_7.grid(column=20,row=30, ipadx=10)

b22_0.grid(column=13,row=36)
b22_1.grid(column=14,row=36)
b22_2.grid(column=15,row=36)
b22_3.grid(column=16,row=36)
b22_4.grid(column=17,row=36)
b22_5.grid(column=18,row=36, ipadx=10)
b22_7.grid(column=20,row=36, ipadx=10)

b23_0.grid(column=13,row=42)
b23_1.grid(column=14,row=42)
b23_2.grid(column=15,row=42)
b23_3.grid(column=16,row=42)
b23_4.grid(column=17,row=42)
b23_5.grid(column=18,row=42, ipadx=10)
b23_7.grid(column=20,row=42, ipadx=10)

# Group 7

# defining labels
nameb24_0 = ttk.Label(content, text="Note 25", background=c1.get())
nameb25_0 = ttk.Label(content, text="Note 26", background=c1.get())
nameb26_0 = ttk.Label(content, text="Note 27", background=c1.get())
nameb27_0 = ttk.Label(content, text="Note 28", background=c1.get())


# Defining number type
b24_0var = IntVar()
b24_1var = IntVar()
b24_2var = IntVar()
b24_3var = IntVar()
b24_4var = IntVar()
b24_5var = IntVar()
b24_7var = IntVar()

b25_0var = IntVar()
b25_1var = IntVar()
b25_2var = IntVar()
b25_3var = IntVar()
b25_4var = IntVar()
b25_5var = IntVar()
b25_7var = IntVar()

b26_0var = IntVar()
b26_1var = IntVar()
b26_2var = IntVar()
b26_3var = IntVar()
b26_4var = IntVar()
b26_5var = IntVar()
b26_7var = IntVar()

b27_0var = IntVar()
b27_1var = IntVar()
b27_2var = IntVar()
b27_3var = IntVar()
b27_4var = IntVar()
b27_5var = IntVar()
b27_7var = IntVar()

# Setting default button position
b24_0var.set(0)
b24_1var.set(0)
b24_2var.set(0)
b24_3var.set(0)
b24_4var.set(0)
b24_5var.set(0)
b24_7var.set(0)

b25_0var.set(0)
b25_1var.set(0)
b25_2var.set(0)
b25_3var.set(0)
b25_4var.set(0)
b25_5var.set(0)
b25_7var.set(0)

b26_0var.set(0)
b26_1var.set(0)
b26_2var.set(0)
b26_3var.set(0)
b26_4var.set(0)
b26_5var.set(0)
b26_7var.set(0)

b27_0var.set(0)
b27_1var.set(0)
b27_2var.set(0)
b27_3var.set(0)
b27_4var.set(0)
b27_5var.set(0)
b27_7var.set(0)

# Defining button
b24_0 = ttk.Checkbutton(content, text="1", variable=b24_0var, onvalue=1, offvalue=0)
b24_1 = ttk.Checkbutton(content, text="2", variable=b24_1var, onvalue=1, offvalue=0)
b24_2 = ttk.Checkbutton(content, text="4", variable=b24_2var, onvalue=1, offvalue=0)
b24_3 = ttk.Checkbutton(content, text="8", variable=b24_3var, onvalue=1, offvalue=0)
b24_4 = ttk.Checkbutton(content, text="16", variable=b24_4var, onvalue=1, offvalue=0)
b24_5 = ttk.Checkbutton(content, text="32", variable=b24_5var, onvalue=1, offvalue=0)
b24_7 = ttk.Checkbutton(content, text="HALT", variable=b24_7var, onvalue=1, offvalue=0)

b25_0 = ttk.Checkbutton(content, text="1", variable=b25_0var, onvalue=1, offvalue=0)
b25_1 = ttk.Checkbutton(content, text="2", variable=b25_1var, onvalue=1, offvalue=0)
b25_2 = ttk.Checkbutton(content, text="4", variable=b25_2var, onvalue=1, offvalue=0)
b25_3 = ttk.Checkbutton(content, text="8", variable=b25_3var, onvalue=1, offvalue=0)
b25_4 = ttk.Checkbutton(content, text="16", variable=b25_4var, onvalue=1, offvalue=0)
b25_5 = ttk.Checkbutton(content, text="32", variable=b25_5var, onvalue=1, offvalue=0)
b25_7 = ttk.Checkbutton(content, text="HALT", variable=b25_7var, onvalue=1, offvalue=0)

b26_0 = ttk.Checkbutton(content, text="1", variable=b26_0var, onvalue=1, offvalue=0)
b26_1 = ttk.Checkbutton(content, text="2", variable=b26_1var, onvalue=1, offvalue=0)
b26_2 = ttk.Checkbutton(content, text="4", variable=b26_2var, onvalue=1, offvalue=0)
b26_3 = ttk.Checkbutton(content, text="8", variable=b26_3var, onvalue=1, offvalue=0)
b26_4 = ttk.Checkbutton(content, text="16", variable=b26_4var, onvalue=1, offvalue=0)
b26_5 = ttk.Checkbutton(content, text="32", variable=b26_5var, onvalue=1, offvalue=0)
b26_7 = ttk.Checkbutton(content, text="HALT", variable=b26_7var, onvalue=1, offvalue=0)

b27_0 = ttk.Checkbutton(content, text="1", variable=b27_0var, onvalue=1, offvalue=0)
b27_1 = ttk.Checkbutton(content, text="2", variable=b27_1var, onvalue=1, offvalue=0)
b27_2 = ttk.Checkbutton(content, text="4", variable=b27_2var, onvalue=1, offvalue=0)
b27_3 = ttk.Checkbutton(content, text="8", variable=b27_3var, onvalue=1, offvalue=0)
b27_4 = ttk.Checkbutton(content, text="16", variable=b27_4var, onvalue=1, offvalue=0)
b27_5 = ttk.Checkbutton(content, text="32", variable=b27_5var, onvalue=1, offvalue=0)
b27_7 = ttk.Checkbutton(content, text="HALT", variable=b27_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb24_0.grid(column=16, row=47, columnspan=2)
nameb25_0.grid(column=16, row=53, columnspan=2)
nameb26_0.grid(column=16, row=59, columnspan=2)
nameb27_0.grid(column=16, row=65, columnspan=2)

# Placing buttons on grid
b24_0.grid(column=13,row=48)
b24_1.grid(column=14,row=48)
b24_2.grid(column=15,row=48)
b24_3.grid(column=16,row=48)
b24_4.grid(column=17,row=48)
b24_5.grid(column=18,row=48, ipadx=10)
b24_7.grid(column=20,row=48, ipadx=10)

b25_0.grid(column=13,row=54)
b25_1.grid(column=14,row=54)
b25_2.grid(column=15,row=54)
b25_3.grid(column=16,row=54)
b25_4.grid(column=17,row=54)
b25_5.grid(column=18,row=54, ipadx=10)
b25_7.grid(column=20,row=54, ipadx=10)

b26_0.grid(column=13,row=60)
b26_1.grid(column=14,row=60)
b26_2.grid(column=15,row=60)
b26_3.grid(column=16,row=60)
b26_4.grid(column=17,row=60)
b26_5.grid(column=18,row=60, ipadx=10)
b26_7.grid(column=20,row=60, ipadx=10)

b27_0.grid(column=13,row=66)
b27_1.grid(column=14,row=66)
b27_2.grid(column=15,row=66)
b27_3.grid(column=16,row=66)
b27_4.grid(column=17,row=66)
b27_5.grid(column=18,row=66, ipadx=10)
b27_7.grid(column=20,row=66, ipadx=10)

# Group 8

# defining labels
nameb28_0 = ttk.Label(content, text="Note 29", background=c1.get())
nameb29_0 = ttk.Label(content, text="Note 30", background=c1.get())
nameb30_0 = ttk.Label(content, text="Note 31", background=c1.get())
nameb31_0 = ttk.Label(content, text="Note 32", background=c1.get())


# Defining number type
b28_0var = IntVar()
b28_1var = IntVar()
b28_2var = IntVar()
b28_3var = IntVar()
b28_4var = IntVar()
b28_5var = IntVar()
b28_7var = IntVar()

b29_0var = IntVar()
b29_1var = IntVar()
b29_2var = IntVar()
b29_3var = IntVar()
b29_4var = IntVar()
b29_5var = IntVar()
b29_7var = IntVar()

b30_0var = IntVar()
b30_1var = IntVar()
b30_2var = IntVar()
b30_3var = IntVar()
b30_4var = IntVar()
b30_5var = IntVar()
b30_7var = IntVar()

b31_0var = IntVar()
b31_1var = IntVar()
b31_2var = IntVar()
b31_3var = IntVar()
b31_4var = IntVar()
b31_5var = IntVar()
b31_7var = IntVar()

# Setting default button position
b28_0var.set(0)
b28_1var.set(0)
b28_2var.set(0)
b28_3var.set(0)
b28_4var.set(0)
b28_5var.set(0)
b28_7var.set(0)

b29_0var.set(0)
b29_1var.set(0)
b29_2var.set(0)
b29_3var.set(0)
b29_4var.set(0)
b29_5var.set(0)
b29_7var.set(0)

b30_0var.set(0)
b30_1var.set(0)
b30_2var.set(0)
b30_3var.set(0)
b30_4var.set(0)
b30_5var.set(0)
b30_7var.set(0)

b31_0var.set(0)
b31_1var.set(0)
b31_2var.set(0)
b31_3var.set(0)
b31_4var.set(0)
b31_5var.set(0)
b31_7var.set(0)

# Defining button
b28_0 = ttk.Checkbutton(content, text="1", variable=b28_0var, onvalue=1, offvalue=0)
b28_1 = ttk.Checkbutton(content, text="2", variable=b28_1var, onvalue=1, offvalue=0)
b28_2 = ttk.Checkbutton(content, text="4", variable=b28_2var, onvalue=1, offvalue=0)
b28_3 = ttk.Checkbutton(content, text="8", variable=b28_3var, onvalue=1, offvalue=0)
b28_4 = ttk.Checkbutton(content, text="16", variable=b28_4var, onvalue=1, offvalue=0)
b28_5 = ttk.Checkbutton(content, text="32", variable=b28_5var, onvalue=1, offvalue=0)
b28_7 = ttk.Checkbutton(content, text="HALT", variable=b28_7var, onvalue=1, offvalue=0)

b29_0 = ttk.Checkbutton(content, text="1", variable=b29_0var, onvalue=1, offvalue=0)
b29_1 = ttk.Checkbutton(content, text="2", variable=b29_1var, onvalue=1, offvalue=0)
b29_2 = ttk.Checkbutton(content, text="4", variable=b29_2var, onvalue=1, offvalue=0)
b29_3 = ttk.Checkbutton(content, text="8", variable=b29_3var, onvalue=1, offvalue=0)
b29_4 = ttk.Checkbutton(content, text="16", variable=b29_4var, onvalue=1, offvalue=0)
b29_5 = ttk.Checkbutton(content, text="32", variable=b29_5var, onvalue=1, offvalue=0)
b29_7 = ttk.Checkbutton(content, text="HALT", variable=b29_7var, onvalue=1, offvalue=0)

b30_0 = ttk.Checkbutton(content, text="1", variable=b30_0var, onvalue=1, offvalue=0)
b30_1 = ttk.Checkbutton(content, text="2", variable=b30_1var, onvalue=1, offvalue=0)
b30_2 = ttk.Checkbutton(content, text="4", variable=b30_2var, onvalue=1, offvalue=0)
b30_3 = ttk.Checkbutton(content, text="8", variable=b30_3var, onvalue=1, offvalue=0)
b30_4 = ttk.Checkbutton(content, text="16", variable=b30_4var, onvalue=1, offvalue=0)
b30_5 = ttk.Checkbutton(content, text="32", variable=b30_5var, onvalue=1, offvalue=0)
b30_7 = ttk.Checkbutton(content, text="HALT", variable=b30_7var, onvalue=1, offvalue=0)

b31_0 = ttk.Checkbutton(content, text="1", variable=b31_0var, onvalue=1, offvalue=0)
b31_1 = ttk.Checkbutton(content, text="2", variable=b31_1var, onvalue=1, offvalue=0)
b31_2 = ttk.Checkbutton(content, text="4", variable=b31_2var, onvalue=1, offvalue=0)
b31_3 = ttk.Checkbutton(content, text="8", variable=b31_3var, onvalue=1, offvalue=0)
b31_4 = ttk.Checkbutton(content, text="16", variable=b31_4var, onvalue=1, offvalue=0)
b31_5 = ttk.Checkbutton(content, text="32", variable=b31_5var, onvalue=1, offvalue=0)
b31_7 = ttk.Checkbutton(content, text="HALT", variable=b31_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb28_0.grid(column=16, row=71, columnspan=2)
nameb29_0.grid(column=16, row=77, columnspan=2)
nameb30_0.grid(column=16, row=83, columnspan=2)
nameb31_0.grid(column=16, row=89, columnspan=2)

# Placing buttons on grid
b28_0.grid(column=13,row=72)
b28_1.grid(column=14,row=72)
b28_2.grid(column=15,row=72)
b28_3.grid(column=16,row=72)
b28_4.grid(column=17,row=72)
b28_5.grid(column=18,row=72, ipadx=10)
b28_7.grid(column=20,row=72, ipadx=10)

b29_0.grid(column=13,row=78)
b29_1.grid(column=14,row=78)
b29_2.grid(column=15,row=78)
b29_3.grid(column=16,row=78)
b29_4.grid(column=17,row=78)
b29_5.grid(column=18,row=78, ipadx=10)
b29_7.grid(column=20,row=78, ipadx=10)

b30_0.grid(column=13,row=84)
b30_1.grid(column=14,row=84)
b30_2.grid(column=15,row=84)
b30_3.grid(column=16,row=84)
b30_4.grid(column=17,row=84)
b30_5.grid(column=18,row=84, ipadx=10)
b30_7.grid(column=20,row=84, ipadx=10)

b31_0.grid(column=13,row=90)
b31_1.grid(column=14,row=90)
b31_2.grid(column=15,row=90)
b31_3.grid(column=16,row=90)
b31_4.grid(column=17,row=90)
b31_5.grid(column=18,row=90, ipadx=10)
b31_7.grid(column=20,row=90, ipadx=10)

#Group 9

# defining labels
nameb32_0 = ttk.Label(content, text="Note 33", background=c1.get())
nameb33_0 = ttk.Label(content, text="Note 34", background=c1.get())
nameb34_0 = ttk.Label(content, text="Note 35", background=c1.get())
nameb35_0 = ttk.Label(content, text="Note 36", background=c1.get())

# Defining number type
b32_0var = IntVar()
b32_1var = IntVar()
b32_2var = IntVar()
b32_3var = IntVar()
b32_4var = IntVar()
b32_5var = IntVar()
b32_7var = IntVar()

b33_0var = IntVar()
b33_1var = IntVar()
b33_2var = IntVar()
b33_3var = IntVar()
b33_4var = IntVar()
b33_5var = IntVar()
b33_7var = IntVar()

b34_0var = IntVar()
b34_1var = IntVar()
b34_2var = IntVar()
b34_3var = IntVar()
b34_4var = IntVar()
b34_5var = IntVar()
b34_7var = IntVar()

b35_0var = IntVar()
b35_1var = IntVar()
b35_2var = IntVar()
b35_3var = IntVar()
b35_4var = IntVar()
b35_5var = IntVar()
b35_7var = IntVar()

# setting default button position
b32_0var.set(0)
b32_1var.set(0)
b32_2var.set(0)
b32_3var.set(0)
b32_4var.set(0)
b32_5var.set(0)
b32_7var.set(0)

b33_0var.set(0)
b33_1var.set(0)
b33_2var.set(0)
b33_3var.set(0)
b33_4var.set(0)
b33_5var.set(0)
b33_7var.set(0)

b34_0var.set(0)
b34_1var.set(0)
b34_2var.set(0)
b34_3var.set(0)
b34_4var.set(0)
b34_5var.set(0)
b34_7var.set(0)

b35_0var.set(0)
b35_1var.set(0)
b35_2var.set(0)
b35_3var.set(0)
b35_4var.set(0)
b35_5var.set(0)
b35_7var.set(0)

# defining button



b32_0 = ttk.Checkbutton(content, text="1", variable=b32_0var, onvalue=1, offvalue=0)
b32_1 = ttk.Checkbutton(content, text="2", variable=b32_1var, onvalue=1, offvalue=0)
b32_2 = ttk.Checkbutton(content, text="4", variable=b32_2var, onvalue=1, offvalue=0)
b32_3 = ttk.Checkbutton(content, text="8", variable=b32_3var, onvalue=1, offvalue=0)
b32_4 = ttk.Checkbutton(content, text="16", variable=b32_4var, onvalue=1, offvalue=0)
b32_5 = ttk.Checkbutton(content, text="32", variable=b32_5var, onvalue=1, offvalue=0)
b32_7 = ttk.Checkbutton(content, text="HALT", variable=b32_7var, onvalue=1, offvalue=0)

b33_0 = ttk.Checkbutton(content, text="1", variable=b33_0var, onvalue=1, offvalue=0)
b33_1 = ttk.Checkbutton(content, text="2", variable=b33_1var, onvalue=1, offvalue=0)
b33_2 = ttk.Checkbutton(content, text="4", variable=b33_2var, onvalue=1, offvalue=0)
b33_3 = ttk.Checkbutton(content, text="8", variable=b33_3var, onvalue=1, offvalue=0)
b33_4 = ttk.Checkbutton(content, text="16", variable=b33_4var, onvalue=1, offvalue=0)
b33_5 = ttk.Checkbutton(content, text="32", variable=b33_5var, onvalue=1, offvalue=0)
b33_7 = ttk.Checkbutton(content, text="HALT", variable=b33_7var, onvalue=1, offvalue=0)

b34_0 = ttk.Checkbutton(content, text="1", variable=b34_0var, onvalue=1, offvalue=0)
b34_1 = ttk.Checkbutton(content, text="2", variable=b34_1var, onvalue=1, offvalue=0)
b34_2 = ttk.Checkbutton(content, text="4", variable=b34_2var, onvalue=1, offvalue=0)
b34_3 = ttk.Checkbutton(content, text="8", variable=b34_3var, onvalue=1, offvalue=0)
b34_4 = ttk.Checkbutton(content, text="16", variable=b34_4var, onvalue=1, offvalue=0)
b34_5 = ttk.Checkbutton(content, text="32", variable=b34_5var, onvalue=1, offvalue=0)
b34_7 = ttk.Checkbutton(content, text="HALT", variable=b34_7var, onvalue=1, offvalue=0)

b35_0 = ttk.Checkbutton(content, text="1", variable=b35_0var, onvalue=1, offvalue=0)
b35_1 = ttk.Checkbutton(content, text="2", variable=b35_1var, onvalue=1, offvalue=0)
b35_2 = ttk.Checkbutton(content, text="4", variable=b35_2var, onvalue=1, offvalue=0)
b35_3 = ttk.Checkbutton(content, text="8", variable=b35_3var, onvalue=1, offvalue=0)
b35_4 = ttk.Checkbutton(content, text="16", variable=b35_4var, onvalue=1, offvalue=0)
b35_5 = ttk.Checkbutton(content, text="32", variable=b35_5var, onvalue=1, offvalue=0)
b35_7 = ttk.Checkbutton(content, text="HALT", variable=b35_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# placing text above each byte
nameb32_0.grid(column=28, row=0, columnspan=2)
nameb33_0.grid(column=28, row=5, columnspan=2)
nameb34_0.grid(column=28, row=11, columnspan=2)
nameb35_0.grid(column=28, row=17, columnspan=2)


# placing buttons on grid
b32_0.grid(column=25,row=3)
b32_1.grid(column=26,row=3)
b32_2.grid(column=27,row=3)
b32_3.grid(column=28,row=3)
b32_4.grid(column=29,row=3)
b32_5.grid(column=30,row=3, ipadx=10)
b32_7.grid(column=32,row=3, ipadx=10)

b33_0.grid(column=25,row=6)
b33_1.grid(column=26,row=6)
b33_2.grid(column=27,row=6)
b33_3.grid(column=28,row=6)
b33_4.grid(column=29,row=6)
b33_5.grid(column=30,row=6, ipadx=10)
b33_7.grid(column=32,row=6, ipadx=10)

b34_0.grid(column=25,row=12)
b34_1.grid(column=26,row=12)
b34_2.grid(column=27,row=12)
b34_3.grid(column=28,row=12)
b34_4.grid(column=29,row=12)
b34_5.grid(column=30,row=12, ipadx=10)
b34_7.grid(column=32,row=12, ipadx=10)

b35_0.grid(column=25,row=18)
b35_1.grid(column=26,row=18)
b35_2.grid(column=27,row=18)
b35_3.grid(column=28,row=18)
b35_4.grid(column=29,row=18)
b35_5.grid(column=30,row=18, ipadx=10)
b35_7.grid(column=32,row=18, ipadx=10)


# group 10

# defining labels
nameb36_0 = ttk.Label(content, text="Note 37", background=c1.get())
nameb37_0 = ttk.Label(content, text="Note 38", background=c1.get())
nameb38_0 = ttk.Label(content, text="Note 39", background=c1.get())
nameb39_0 = ttk.Label(content, text="Note 40", background=c1.get())


# Defining number type
b36_0var = IntVar()
b36_1var = IntVar()
b36_2var = IntVar()
b36_3var = IntVar()
b36_4var = IntVar()
b36_5var = IntVar()
b36_7var = IntVar()

b37_0var = IntVar()
b37_1var = IntVar()
b37_2var = IntVar()
b37_3var = IntVar()
b37_4var = IntVar()
b37_5var = IntVar()
b37_7var = IntVar()

b38_0var = IntVar()
b38_1var = IntVar()
b38_2var = IntVar()
b38_3var = IntVar()
b38_4var = IntVar()
b38_5var = IntVar()
b38_7var = IntVar()

b39_0var = IntVar()
b39_1var = IntVar()
b39_2var = IntVar()
b39_3var = IntVar()
b39_4var = IntVar()
b39_5var = IntVar()
b39_7var = IntVar()

# Setting default button position
b36_0var.set(0)
b36_1var.set(0)
b36_2var.set(0)
b36_3var.set(0)
b36_4var.set(0)
b36_5var.set(0)
b36_7var.set(0)

b37_0var.set(0)
b37_1var.set(0)
b37_2var.set(0)
b37_3var.set(0)
b37_4var.set(0)
b37_5var.set(0)
b37_7var.set(0)

b38_0var.set(0)
b38_1var.set(0)
b38_2var.set(0)
b38_3var.set(0)
b38_4var.set(0)
b38_5var.set(0)
b38_7var.set(0)

b39_0var.set(0)
b39_1var.set(0)
b39_2var.set(0)
b39_3var.set(0)
b39_4var.set(0)
b39_5var.set(0)
b39_7var.set(0)

# Defining button
b36_0 = ttk.Checkbutton(content, text="1", variable=b36_0var, onvalue=1, offvalue=0)
b36_1 = ttk.Checkbutton(content, text="2", variable=b36_1var, onvalue=1, offvalue=0)
b36_2 = ttk.Checkbutton(content, text="4", variable=b36_2var, onvalue=1, offvalue=0)
b36_3 = ttk.Checkbutton(content, text="8", variable=b36_3var, onvalue=1, offvalue=0)
b36_4 = ttk.Checkbutton(content, text="16", variable=b36_4var, onvalue=1, offvalue=0)
b36_5 = ttk.Checkbutton(content, text="32", variable=b36_5var, onvalue=1, offvalue=0)
b36_7 = ttk.Checkbutton(content, text="HALT", variable=b36_7var, onvalue=1, offvalue=0)

b37_0 = ttk.Checkbutton(content, text="1", variable=b37_0var, onvalue=1, offvalue=0)
b37_1 = ttk.Checkbutton(content, text="2", variable=b37_1var, onvalue=1, offvalue=0)
b37_2 = ttk.Checkbutton(content, text="4", variable=b37_2var, onvalue=1, offvalue=0)
b37_3 = ttk.Checkbutton(content, text="8", variable=b37_3var, onvalue=1, offvalue=0)
b37_4 = ttk.Checkbutton(content, text="16", variable=b37_4var, onvalue=1, offvalue=0)
b37_5 = ttk.Checkbutton(content, text="32", variable=b37_5var, onvalue=1, offvalue=0)
b37_7 = ttk.Checkbutton(content, text="HALT", variable=b37_7var, onvalue=1, offvalue=0)

b38_0 = ttk.Checkbutton(content, text="1", variable=b38_0var, onvalue=1, offvalue=0)
b38_1 = ttk.Checkbutton(content, text="2", variable=b38_1var, onvalue=1, offvalue=0)
b38_2 = ttk.Checkbutton(content, text="4", variable=b38_2var, onvalue=1, offvalue=0)
b38_3 = ttk.Checkbutton(content, text="8", variable=b38_3var, onvalue=1, offvalue=0)
b38_4 = ttk.Checkbutton(content, text="16", variable=b38_4var, onvalue=1, offvalue=0)
b38_5 = ttk.Checkbutton(content, text="32", variable=b38_5var, onvalue=1, offvalue=0)
b38_7 = ttk.Checkbutton(content, text="HALT", variable=b38_7var, onvalue=1, offvalue=0)

b39_0 = ttk.Checkbutton(content, text="1", variable=b39_0var, onvalue=1, offvalue=0)
b39_1 = ttk.Checkbutton(content, text="2", variable=b39_1var, onvalue=1, offvalue=0)
b39_2 = ttk.Checkbutton(content, text="4", variable=b39_2var, onvalue=1, offvalue=0)
b39_3 = ttk.Checkbutton(content, text="8", variable=b39_3var, onvalue=1, offvalue=0)
b39_4 = ttk.Checkbutton(content, text="16", variable=b39_4var, onvalue=1, offvalue=0)
b39_5 = ttk.Checkbutton(content, text="32", variable=b39_5var, onvalue=1, offvalue=0)
b39_7 = ttk.Checkbutton(content, text="HALT", variable=b39_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb36_0.grid(column=28, row=23, columnspan=2)
nameb37_0.grid(column=28, row=29, columnspan=2)
nameb38_0.grid(column=28, row=35, columnspan=2)
nameb39_0.grid(column=28, row=41, columnspan=2)

# Placing buttons on grid
b36_0.grid(column=25,row=24)
b36_1.grid(column=26,row=24)
b36_2.grid(column=27,row=24)
b36_3.grid(column=28,row=24)
b36_4.grid(column=29,row=24)
b36_5.grid(column=30,row=24, ipadx=10)
b36_7.grid(column=32,row=24, ipadx=10)

b37_0.grid(column=25,row=30)
b37_1.grid(column=26,row=30)
b37_2.grid(column=27,row=30)
b37_3.grid(column=28,row=30)
b37_4.grid(column=29,row=30)
b37_5.grid(column=30,row=30, ipadx=10)
b37_7.grid(column=32,row=30, ipadx=10)

b38_0.grid(column=25,row=36)
b38_1.grid(column=26,row=36)
b38_2.grid(column=27,row=36)
b38_3.grid(column=28,row=36)
b38_4.grid(column=29,row=36)
b38_5.grid(column=30,row=36, ipadx=10)
b38_7.grid(column=32,row=36, ipadx=10)

b39_0.grid(column=25,row=42)
b39_1.grid(column=26,row=42)
b39_2.grid(column=27,row=42)
b39_3.grid(column=28,row=42)
b39_4.grid(column=29,row=42)
b39_5.grid(column=30,row=42, ipadx=10)
b39_7.grid(column=32,row=42, ipadx=10)

# group 11

# defining labels
nameb40_0 = ttk.Label(content, text="Note 41", background=c1.get())
nameb41_0 = ttk.Label(content, text="Note 42", background=c1.get())
nameb42_0 = ttk.Label(content, text="Note 43", background=c1.get())
nameb43_0 = ttk.Label(content, text="Note 44", background=c1.get())


# Defining number type
b40_0var = IntVar()
b40_1var = IntVar()
b40_2var = IntVar()
b40_3var = IntVar()
b40_4var = IntVar()
b40_5var = IntVar()
b40_7var = IntVar()

b41_0var = IntVar()
b41_1var = IntVar()
b41_2var = IntVar()
b41_3var = IntVar()
b41_4var = IntVar()
b41_5var = IntVar()
b41_7var = IntVar()

b42_0var = IntVar()
b42_1var = IntVar()
b42_2var = IntVar()
b42_3var = IntVar()
b42_4var = IntVar()
b42_5var = IntVar()
b42_7var = IntVar()

b43_0var = IntVar()
b43_1var = IntVar()
b43_2var = IntVar()
b43_3var = IntVar()
b43_4var = IntVar()
b43_5var = IntVar()
b43_7var = IntVar()

# Setting default button position
b40_0var.set(0)
b40_1var.set(0)
b40_2var.set(0)
b40_3var.set(0)
b40_4var.set(0)
b40_5var.set(0)
b40_7var.set(0)

b41_0var.set(0)
b41_1var.set(0)
b41_2var.set(0)
b41_3var.set(0)
b41_4var.set(0)
b41_5var.set(0)
b41_7var.set(0)

b42_0var.set(0)
b42_1var.set(0)
b42_2var.set(0)
b42_3var.set(0)
b42_4var.set(0)
b42_5var.set(0)
b42_7var.set(0)

b43_0var.set(0)
b43_1var.set(0)
b43_2var.set(0)
b43_3var.set(0)
b43_4var.set(0)
b43_5var.set(0)
b43_7var.set(0)

# Defining button
b40_0 = ttk.Checkbutton(content, text="1", variable=b40_0var, onvalue=1, offvalue=0)
b40_1 = ttk.Checkbutton(content, text="2", variable=b40_1var, onvalue=1, offvalue=0)
b40_2 = ttk.Checkbutton(content, text="4", variable=b40_2var, onvalue=1, offvalue=0)
b40_3 = ttk.Checkbutton(content, text="8", variable=b40_3var, onvalue=1, offvalue=0)
b40_4 = ttk.Checkbutton(content, text="16", variable=b40_4var, onvalue=1, offvalue=0)
b40_5 = ttk.Checkbutton(content, text="32", variable=b40_5var, onvalue=1, offvalue=0)
b40_7 = ttk.Checkbutton(content, text="HALT", variable=b40_7var, onvalue=1, offvalue=0)

b41_0 = ttk.Checkbutton(content, text="1", variable=b41_0var, onvalue=1, offvalue=0)
b41_1 = ttk.Checkbutton(content, text="2", variable=b41_1var, onvalue=1, offvalue=0)
b41_2 = ttk.Checkbutton(content, text="4", variable=b41_2var, onvalue=1, offvalue=0)
b41_3 = ttk.Checkbutton(content, text="8", variable=b41_3var, onvalue=1, offvalue=0)
b41_4 = ttk.Checkbutton(content, text="16", variable=b41_4var, onvalue=1, offvalue=0)
b41_5 = ttk.Checkbutton(content, text="32", variable=b41_5var, onvalue=1, offvalue=0)
b41_7 = ttk.Checkbutton(content, text="HALT", variable=b41_7var, onvalue=1, offvalue=0)

b42_0 = ttk.Checkbutton(content, text="1", variable=b42_0var, onvalue=1, offvalue=0)
b42_1 = ttk.Checkbutton(content, text="2", variable=b42_1var, onvalue=1, offvalue=0)
b42_2 = ttk.Checkbutton(content, text="4", variable=b42_2var, onvalue=1, offvalue=0)
b42_3 = ttk.Checkbutton(content, text="8", variable=b42_3var, onvalue=1, offvalue=0)
b42_4 = ttk.Checkbutton(content, text="16", variable=b42_4var, onvalue=1, offvalue=0)
b42_5 = ttk.Checkbutton(content, text="32", variable=b42_5var, onvalue=1, offvalue=0)
b42_7 = ttk.Checkbutton(content, text="HALT", variable=b42_7var, onvalue=1, offvalue=0)

b43_0 = ttk.Checkbutton(content, text="1", variable=b43_0var, onvalue=1, offvalue=0)
b43_1 = ttk.Checkbutton(content, text="2", variable=b43_1var, onvalue=1, offvalue=0)
b43_2 = ttk.Checkbutton(content, text="4", variable=b43_2var, onvalue=1, offvalue=0)
b43_3 = ttk.Checkbutton(content, text="8", variable=b43_3var, onvalue=1, offvalue=0)
b43_4 = ttk.Checkbutton(content, text="16", variable=b43_4var, onvalue=1, offvalue=0)
b43_5 = ttk.Checkbutton(content, text="32", variable=b43_5var, onvalue=1, offvalue=0)
b43_7 = ttk.Checkbutton(content, text="HALT", variable=b43_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb40_0.grid(column=28, row=47, columnspan=2)
nameb41_0.grid(column=28, row=53, columnspan=2)
nameb42_0.grid(column=28, row=59, columnspan=2)
nameb43_0.grid(column=28, row=65, columnspan=2)

# Placing buttons on grid
b40_0.grid(column=25,row=48)
b40_1.grid(column=26,row=48)
b40_2.grid(column=27,row=48)
b40_3.grid(column=28,row=48)
b40_4.grid(column=29,row=48)
b40_5.grid(column=30,row=48, ipadx=10)
b40_7.grid(column=32,row=48, ipadx=10)

b41_0.grid(column=25,row=54)
b41_1.grid(column=26,row=54)
b41_2.grid(column=27,row=54)
b41_3.grid(column=28,row=54)
b41_4.grid(column=29,row=54)
b41_5.grid(column=30,row=54, ipadx=10)
b41_7.grid(column=32,row=54, ipadx=10)

b42_0.grid(column=25,row=60)
b42_1.grid(column=26,row=60)
b42_2.grid(column=27,row=60)
b42_3.grid(column=28,row=60)
b42_4.grid(column=29,row=60)
b42_5.grid(column=30,row=60, ipadx=10)
b42_7.grid(column=32,row=60, ipadx=10)

b43_0.grid(column=25,row=66)
b43_1.grid(column=26,row=66)
b43_2.grid(column=27,row=66)
b43_3.grid(column=28,row=66)
b43_4.grid(column=29,row=66)
b43_5.grid(column=30,row=66, ipadx=10)
b43_7.grid(column=32,row=66, ipadx=10)

# Group 12

# defining labels
nameb44_0 = ttk.Label(content, text="Note 45", background=c1.get())
nameb45_0 = ttk.Label(content, text="Note 46", background=c1.get())
nameb46_0 = ttk.Label(content, text="Note 47", background=c1.get())
nameb47_0 = ttk.Label(content, text="Note 48", background=c1.get())


# Defining number type
b44_0var = IntVar()
b44_1var = IntVar()
b44_2var = IntVar()
b44_3var = IntVar()
b44_4var = IntVar()
b44_5var = IntVar()
b44_7var = IntVar()

b45_0var = IntVar()
b45_1var = IntVar()
b45_2var = IntVar()
b45_3var = IntVar()
b45_4var = IntVar()
b45_5var = IntVar()
b45_7var = IntVar()

b46_0var = IntVar()
b46_1var = IntVar()
b46_2var = IntVar()
b46_3var = IntVar()
b46_4var = IntVar()
b46_5var = IntVar()
b46_7var = IntVar()

b47_0var = IntVar()
b47_1var = IntVar()
b47_2var = IntVar()
b47_3var = IntVar()
b47_4var = IntVar()
b47_5var = IntVar()
b47_7var = IntVar()

# Setting default button position
b44_0var.set(0)
b44_1var.set(0)
b44_2var.set(0)
b44_3var.set(0)
b44_4var.set(0)
b44_5var.set(0)
b44_7var.set(0)

b45_0var.set(0)
b45_1var.set(0)
b45_2var.set(0)
b45_3var.set(0)
b45_4var.set(0)
b45_5var.set(0)
b45_7var.set(0)

b46_0var.set(0)
b46_1var.set(0)
b46_2var.set(0)
b46_3var.set(0)
b46_4var.set(0)
b46_5var.set(0)
b46_7var.set(0)

b47_0var.set(0)
b47_1var.set(0)
b47_2var.set(0)
b47_3var.set(0)
b47_4var.set(0)
b47_5var.set(0)
b47_7var.set(0)

# Defining button
b44_0 = ttk.Checkbutton(content, text="1", variable=b44_0var, onvalue=1, offvalue=0)
b44_1 = ttk.Checkbutton(content, text="2", variable=b44_1var, onvalue=1, offvalue=0)
b44_2 = ttk.Checkbutton(content, text="4", variable=b44_2var, onvalue=1, offvalue=0)
b44_3 = ttk.Checkbutton(content, text="8", variable=b44_3var, onvalue=1, offvalue=0)
b44_4 = ttk.Checkbutton(content, text="16", variable=b44_4var, onvalue=1, offvalue=0)
b44_5 = ttk.Checkbutton(content, text="32", variable=b44_5var, onvalue=1, offvalue=0)
b44_7 = ttk.Checkbutton(content, text="HALT", variable=b44_7var, onvalue=1, offvalue=0)

b45_0 = ttk.Checkbutton(content, text="1", variable=b45_0var, onvalue=1, offvalue=0)
b45_1 = ttk.Checkbutton(content, text="2", variable=b45_1var, onvalue=1, offvalue=0)
b45_2 = ttk.Checkbutton(content, text="4", variable=b45_2var, onvalue=1, offvalue=0)
b45_3 = ttk.Checkbutton(content, text="8", variable=b45_3var, onvalue=1, offvalue=0)
b45_4 = ttk.Checkbutton(content, text="16", variable=b45_4var, onvalue=1, offvalue=0)
b45_5 = ttk.Checkbutton(content, text="32", variable=b45_5var, onvalue=1, offvalue=0)
b45_7 = ttk.Checkbutton(content, text="HALT", variable=b45_7var, onvalue=1, offvalue=0)

b46_0 = ttk.Checkbutton(content, text="1", variable=b46_0var, onvalue=1, offvalue=0)
b46_1 = ttk.Checkbutton(content, text="2", variable=b46_1var, onvalue=1, offvalue=0)
b46_2 = ttk.Checkbutton(content, text="4", variable=b46_2var, onvalue=1, offvalue=0)
b46_3 = ttk.Checkbutton(content, text="8", variable=b46_3var, onvalue=1, offvalue=0)
b46_4 = ttk.Checkbutton(content, text="16", variable=b46_4var, onvalue=1, offvalue=0)
b46_5 = ttk.Checkbutton(content, text="32", variable=b46_5var, onvalue=1, offvalue=0)
b46_7 = ttk.Checkbutton(content, text="HALT", variable=b46_7var, onvalue=1, offvalue=0)

b47_0 = ttk.Checkbutton(content, text="1", variable=b47_0var, onvalue=1, offvalue=0)
b47_1 = ttk.Checkbutton(content, text="2", variable=b47_1var, onvalue=1, offvalue=0)
b47_2 = ttk.Checkbutton(content, text="4", variable=b47_2var, onvalue=1, offvalue=0)
b47_3 = ttk.Checkbutton(content, text="8", variable=b47_3var, onvalue=1, offvalue=0)
b47_4 = ttk.Checkbutton(content, text="16", variable=b47_4var, onvalue=1, offvalue=0)
b47_5 = ttk.Checkbutton(content, text="32", variable=b47_5var, onvalue=1, offvalue=0)
b47_7 = ttk.Checkbutton(content, text="HALT", variable=b47_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb44_0.grid(column=28, row=71, columnspan=2)
nameb45_0.grid(column=28, row=77, columnspan=2)
nameb46_0.grid(column=28, row=83, columnspan=2)
nameb47_0.grid(column=28, row=89, columnspan=2)

# Placing buttons on grid
b44_0.grid(column=25,row=72)
b44_1.grid(column=26,row=72)
b44_2.grid(column=27,row=72)
b44_3.grid(column=28,row=72)
b44_4.grid(column=29,row=72)
b44_5.grid(column=30,row=72, ipadx=10)
b44_7.grid(column=32,row=72, ipadx=10)

b45_0.grid(column=25,row=78)
b45_1.grid(column=26,row=78)
b45_2.grid(column=27,row=78)
b45_3.grid(column=28,row=78)
b45_4.grid(column=29,row=78)
b45_5.grid(column=30,row=78, ipadx=10)
b45_7.grid(column=32,row=78, ipadx=10)

b46_0.grid(column=25,row=84)
b46_1.grid(column=26,row=84)
b46_2.grid(column=27,row=84)
b46_3.grid(column=28,row=84)
b46_4.grid(column=29,row=84)
b46_5.grid(column=30,row=84, ipadx=10)
b46_7.grid(column=32,row=84, ipadx=10)

b47_0.grid(column=25,row=90)
b47_1.grid(column=26,row=90)
b47_2.grid(column=27,row=90)
b47_3.grid(column=28,row=90)
b47_4.grid(column=29,row=90)
b47_5.grid(column=30,row=90, ipadx=10)
b47_7.grid(column=32,row=90, ipadx=10)

# Group 13

# defining labels
nameb48_0 = ttk.Label(content, text="Note 49", background=c1.get())
nameb49_0 = ttk.Label(content, text="Note 50", background=c1.get())
nameb50_0 = ttk.Label(content, text="Note 51", background=c1.get())
nameb51_0 = ttk.Label(content, text="Note 52", background=c1.get())


# Defining number type
b48_0var = IntVar()
b48_1var = IntVar()
b48_2var = IntVar()
b48_3var = IntVar()
b48_4var = IntVar()
b48_5var = IntVar()
b48_7var = IntVar()

b49_0var = IntVar()
b49_1var = IntVar()
b49_2var = IntVar()
b49_3var = IntVar()
b49_4var = IntVar()
b49_5var = IntVar()
b49_7var = IntVar()

b50_0var = IntVar()
b50_1var = IntVar()
b50_2var = IntVar()
b50_3var = IntVar()
b50_4var = IntVar()
b50_5var = IntVar()
b50_7var = IntVar()

b51_0var = IntVar()
b51_1var = IntVar()
b51_2var = IntVar()
b51_3var = IntVar()
b51_4var = IntVar()
b51_5var = IntVar()
b51_7var = IntVar()

# Setting default button position
b48_0var.set(0)
b48_1var.set(0)
b48_2var.set(0)
b48_3var.set(0)
b48_4var.set(0)
b48_5var.set(0)
b48_7var.set(0)

b49_0var.set(0)
b49_1var.set(0)
b49_2var.set(0)
b49_3var.set(0)
b49_4var.set(0)
b49_5var.set(0)
b49_7var.set(0)

b50_0var.set(0)
b50_1var.set(0)
b50_2var.set(0)
b50_3var.set(0)
b50_4var.set(0)
b50_5var.set(0)
b50_7var.set(0)

b51_0var.set(0)
b51_1var.set(0)
b51_2var.set(0)
b51_3var.set(0)
b51_4var.set(0)
b51_5var.set(0)
b51_7var.set(0)

# Defining button
b48_0 = ttk.Checkbutton(content, text="1", variable=b48_0var, onvalue=1, offvalue=0)
b48_1 = ttk.Checkbutton(content, text="2", variable=b48_1var, onvalue=1, offvalue=0)
b48_2 = ttk.Checkbutton(content, text="4", variable=b48_2var, onvalue=1, offvalue=0)
b48_3 = ttk.Checkbutton(content, text="8", variable=b48_3var, onvalue=1, offvalue=0)
b48_4 = ttk.Checkbutton(content, text="16", variable=b48_4var, onvalue=1, offvalue=0)
b48_5 = ttk.Checkbutton(content, text="32", variable=b48_5var, onvalue=1, offvalue=0)
b48_7 = ttk.Checkbutton(content, text="HALT", variable=b48_7var, onvalue=1, offvalue=0)

b49_0 = ttk.Checkbutton(content, text="1", variable=b49_0var, onvalue=1, offvalue=0)
b49_1 = ttk.Checkbutton(content, text="2", variable=b49_1var, onvalue=1, offvalue=0)
b49_2 = ttk.Checkbutton(content, text="4", variable=b49_2var, onvalue=1, offvalue=0)
b49_3 = ttk.Checkbutton(content, text="8", variable=b49_3var, onvalue=1, offvalue=0)
b49_4 = ttk.Checkbutton(content, text="16", variable=b49_4var, onvalue=1, offvalue=0)
b49_5 = ttk.Checkbutton(content, text="32", variable=b49_5var, onvalue=1, offvalue=0)
b49_7 = ttk.Checkbutton(content, text="HALT", variable=b49_7var, onvalue=1, offvalue=0)

b50_0 = ttk.Checkbutton(content, text="1", variable=b50_0var, onvalue=1, offvalue=0)
b50_1 = ttk.Checkbutton(content, text="2", variable=b50_1var, onvalue=1, offvalue=0)
b50_2 = ttk.Checkbutton(content, text="4", variable=b50_2var, onvalue=1, offvalue=0)
b50_3 = ttk.Checkbutton(content, text="8", variable=b50_3var, onvalue=1, offvalue=0)
b50_4 = ttk.Checkbutton(content, text="16", variable=b50_4var, onvalue=1, offvalue=0)
b50_5 = ttk.Checkbutton(content, text="32", variable=b50_5var, onvalue=1, offvalue=0)
b50_7 = ttk.Checkbutton(content, text="HALT", variable=b50_7var, onvalue=1, offvalue=0)

b51_0 = ttk.Checkbutton(content, text="1", variable=b51_0var, onvalue=1, offvalue=0)
b51_1 = ttk.Checkbutton(content, text="2", variable=b51_1var, onvalue=1, offvalue=0)
b51_2 = ttk.Checkbutton(content, text="4", variable=b51_2var, onvalue=1, offvalue=0)
b51_3 = ttk.Checkbutton(content, text="8", variable=b51_3var, onvalue=1, offvalue=0)
b51_4 = ttk.Checkbutton(content, text="16", variable=b51_4var, onvalue=1, offvalue=0)
b51_5 = ttk.Checkbutton(content, text="32", variable=b51_5var, onvalue=1, offvalue=0)
b51_7 = ttk.Checkbutton(content, text="HALT", variable=b51_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb48_0.grid(column=4, row=95, columnspan=2)
nameb49_0.grid(column=4, row=101, columnspan=2)
nameb50_0.grid(column=4, row=107, columnspan=2)
nameb51_0.grid(column=4, row=113, columnspan=2)

# Placing buttons on grid
b48_0.grid(column=1,row=96)
b48_1.grid(column=2,row=96)
b48_2.grid(column=3,row=96)
b48_3.grid(column=4,row=96)
b48_4.grid(column=5,row=96)
b48_5.grid(column=6,row=96, ipadx=10)
b48_7.grid(column=8,row=96, ipadx=10)

b49_0.grid(column=1,row=102)
b49_1.grid(column=2,row=102)
b49_2.grid(column=3,row=102)
b49_3.grid(column=4,row=102)
b49_4.grid(column=5,row=102)
b49_5.grid(column=6,row=102, ipadx=10)
b49_7.grid(column=8,row=102, ipadx=10)

b50_0.grid(column=1,row=108)
b50_1.grid(column=2,row=108)
b50_2.grid(column=3,row=108)
b50_3.grid(column=4,row=108)
b50_4.grid(column=5,row=108)
b50_5.grid(column=6,row=108, ipadx=10)
b50_7.grid(column=8,row=108, ipadx=10)

b51_0.grid(column=1,row=114)
b51_1.grid(column=2,row=114)
b51_2.grid(column=3,row=114)
b51_3.grid(column=4,row=114)
b51_4.grid(column=5,row=114)
b51_5.grid(column=6,row=114, ipadx=10)
b51_7.grid(column=8,row=114, ipadx=10)

# Group 14

# defining labels
nameb52_0 = ttk.Label(content, text="Note 53", background=c1.get())
nameb53_0 = ttk.Label(content, text="Note 54", background=c1.get())
nameb54_0 = ttk.Label(content, text="Note 55", background=c1.get())
nameb55_0 = ttk.Label(content, text="Note 56", background=c1.get())


# Defining number type
b52_0var = IntVar()
b52_1var = IntVar()
b52_2var = IntVar()
b52_3var = IntVar()
b52_4var = IntVar()
b52_5var = IntVar()
b52_7var = IntVar()

b53_0var = IntVar()
b53_1var = IntVar()
b53_2var = IntVar()
b53_3var = IntVar()
b53_4var = IntVar()
b53_5var = IntVar()
b53_7var = IntVar()

b54_0var = IntVar()
b54_1var = IntVar()
b54_2var = IntVar()
b54_3var = IntVar()
b54_4var = IntVar()
b54_5var = IntVar()
b54_7var = IntVar()

b55_0var = IntVar()
b55_1var = IntVar()
b55_2var = IntVar()
b55_3var = IntVar()
b55_4var = IntVar()
b55_5var = IntVar()
b55_7var = IntVar()

# Setting default button position
b52_0var.set(0)
b52_1var.set(0)
b52_2var.set(0)
b52_3var.set(0)
b52_4var.set(0)
b52_5var.set(0)
b52_7var.set(0)

b53_0var.set(0)
b53_1var.set(0)
b53_2var.set(0)
b53_3var.set(0)
b53_4var.set(0)
b53_5var.set(0)
b53_7var.set(0)

b54_0var.set(0)
b54_1var.set(0)
b54_2var.set(0)
b54_3var.set(0)
b54_4var.set(0)
b54_5var.set(0)
b54_7var.set(0)

b55_0var.set(0)
b55_1var.set(0)
b55_2var.set(0)
b55_3var.set(0)
b55_4var.set(0)
b55_5var.set(0)
b55_7var.set(0)

# Defining button
b52_0 = ttk.Checkbutton(content, text="1", variable=b52_0var, onvalue=1, offvalue=0)
b52_1 = ttk.Checkbutton(content, text="2", variable=b52_1var, onvalue=1, offvalue=0)
b52_2 = ttk.Checkbutton(content, text="4", variable=b52_2var, onvalue=1, offvalue=0)
b52_3 = ttk.Checkbutton(content, text="8", variable=b52_3var, onvalue=1, offvalue=0)
b52_4 = ttk.Checkbutton(content, text="16", variable=b52_4var, onvalue=1, offvalue=0)
b52_5 = ttk.Checkbutton(content, text="32", variable=b52_5var, onvalue=1, offvalue=0)
b52_7 = ttk.Checkbutton(content, text="HALT", variable=b52_7var, onvalue=1, offvalue=0)

b53_0 = ttk.Checkbutton(content, text="1", variable=b53_0var, onvalue=1, offvalue=0)
b53_1 = ttk.Checkbutton(content, text="2", variable=b53_1var, onvalue=1, offvalue=0)
b53_2 = ttk.Checkbutton(content, text="4", variable=b53_2var, onvalue=1, offvalue=0)
b53_3 = ttk.Checkbutton(content, text="8", variable=b53_3var, onvalue=1, offvalue=0)
b53_4 = ttk.Checkbutton(content, text="16", variable=b53_4var, onvalue=1, offvalue=0)
b53_5 = ttk.Checkbutton(content, text="32", variable=b53_5var, onvalue=1, offvalue=0)
b53_7 = ttk.Checkbutton(content, text="HALT", variable=b53_7var, onvalue=1, offvalue=0)

b54_0 = ttk.Checkbutton(content, text="1", variable=b54_0var, onvalue=1, offvalue=0)
b54_1 = ttk.Checkbutton(content, text="2", variable=b54_1var, onvalue=1, offvalue=0)
b54_2 = ttk.Checkbutton(content, text="4", variable=b54_2var, onvalue=1, offvalue=0)
b54_3 = ttk.Checkbutton(content, text="8", variable=b54_3var, onvalue=1, offvalue=0)
b54_4 = ttk.Checkbutton(content, text="16", variable=b54_4var, onvalue=1, offvalue=0)
b54_5 = ttk.Checkbutton(content, text="32", variable=b54_5var, onvalue=1, offvalue=0)
b54_7 = ttk.Checkbutton(content, text="HALT", variable=b54_7var, onvalue=1, offvalue=0)

b55_0 = ttk.Checkbutton(content, text="1", variable=b55_0var, onvalue=1, offvalue=0)
b55_1 = ttk.Checkbutton(content, text="2", variable=b55_1var, onvalue=1, offvalue=0)
b55_2 = ttk.Checkbutton(content, text="4", variable=b55_2var, onvalue=1, offvalue=0)
b55_3 = ttk.Checkbutton(content, text="8", variable=b55_3var, onvalue=1, offvalue=0)
b55_4 = ttk.Checkbutton(content, text="16", variable=b55_4var, onvalue=1, offvalue=0)
b55_5 = ttk.Checkbutton(content, text="32", variable=b55_5var, onvalue=1, offvalue=0)
b55_7 = ttk.Checkbutton(content, text="HALT", variable=b55_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb52_0.grid(column=4, row=119, columnspan=2)
nameb53_0.grid(column=4, row=125, columnspan=2)
nameb54_0.grid(column=4, row=131, columnspan=2)
nameb55_0.grid(column=4, row=137, columnspan=2)

# Placing buttons on grid
b52_0.grid(column=1,row=120)
b52_1.grid(column=2,row=120)
b52_2.grid(column=3,row=120)
b52_3.grid(column=4,row=120)
b52_4.grid(column=5,row=120)
b52_5.grid(column=6,row=120, ipadx=10)
b52_7.grid(column=8,row=120, ipadx=10)

b53_0.grid(column=1,row=126)
b53_1.grid(column=2,row=126)
b53_2.grid(column=3,row=126)
b53_3.grid(column=4,row=126)
b53_4.grid(column=5,row=126)
b53_5.grid(column=6,row=126, ipadx=10)
b53_7.grid(column=8,row=126, ipadx=10)

b54_0.grid(column=1,row=132)
b54_1.grid(column=2,row=132)
b54_2.grid(column=3,row=132)
b54_3.grid(column=4,row=132)
b54_4.grid(column=5,row=132)
b54_5.grid(column=6,row=132, ipadx=10)
b54_7.grid(column=8,row=132, ipadx=10)

b55_0.grid(column=1,row=138)
b55_1.grid(column=2,row=138)
b55_2.grid(column=3,row=138)
b55_3.grid(column=4,row=138)
b55_4.grid(column=5,row=138)
b55_5.grid(column=6,row=138, ipadx=10)
b55_7.grid(column=8,row=138, ipadx=10)

# Group 15

# defining labels
nameb56_0 = ttk.Label(content, text="Note 57", background=c1.get())
nameb57_0 = ttk.Label(content, text="Note 58", background=c1.get())
nameb58_0 = ttk.Label(content, text="Note 59", background=c1.get())
nameb59_0 = ttk.Label(content, text="Note 60", background=c1.get())


# Defining number type
b56_0var = IntVar()
b56_1var = IntVar()
b56_2var = IntVar()
b56_3var = IntVar()
b56_4var = IntVar()
b56_5var = IntVar()
b56_7var = IntVar()

b57_0var = IntVar()
b57_1var = IntVar()
b57_2var = IntVar()
b57_3var = IntVar()
b57_4var = IntVar()
b57_5var = IntVar()
b57_7var = IntVar()

b58_0var = IntVar()
b58_1var = IntVar()
b58_2var = IntVar()
b58_3var = IntVar()
b58_4var = IntVar()
b58_5var = IntVar()
b58_7var = IntVar()

b59_0var = IntVar()
b59_1var = IntVar()
b59_2var = IntVar()
b59_3var = IntVar()
b59_4var = IntVar()
b59_5var = IntVar()
b59_7var = IntVar()

# Setting default button position
b56_0var.set(0)
b56_1var.set(0)
b56_2var.set(0)
b56_3var.set(0)
b56_4var.set(0)
b56_5var.set(0)
b56_7var.set(0)

b57_0var.set(0)
b57_1var.set(0)
b57_2var.set(0)
b57_3var.set(0)
b57_4var.set(0)
b57_5var.set(0)
b57_7var.set(0)

b58_0var.set(0)
b58_1var.set(0)
b58_2var.set(0)
b58_3var.set(0)
b58_4var.set(0)
b58_5var.set(0)
b58_7var.set(0)

b59_0var.set(0)
b59_1var.set(0)
b59_2var.set(0)
b59_3var.set(0)
b59_4var.set(0)
b59_5var.set(0)
b59_7var.set(0)

# Defining button
b56_0 = ttk.Checkbutton(content, text="1", variable=b56_0var, onvalue=1, offvalue=0)
b56_1 = ttk.Checkbutton(content, text="2", variable=b56_1var, onvalue=1, offvalue=0)
b56_2 = ttk.Checkbutton(content, text="4", variable=b56_2var, onvalue=1, offvalue=0)
b56_3 = ttk.Checkbutton(content, text="8", variable=b56_3var, onvalue=1, offvalue=0)
b56_4 = ttk.Checkbutton(content, text="16", variable=b56_4var, onvalue=1, offvalue=0)
b56_5 = ttk.Checkbutton(content, text="32", variable=b56_5var, onvalue=1, offvalue=0)
b56_7 = ttk.Checkbutton(content, text="HALT", variable=b56_7var, onvalue=1, offvalue=0)

b57_0 = ttk.Checkbutton(content, text="1", variable=b57_0var, onvalue=1, offvalue=0)
b57_1 = ttk.Checkbutton(content, text="2", variable=b57_1var, onvalue=1, offvalue=0)
b57_2 = ttk.Checkbutton(content, text="4", variable=b57_2var, onvalue=1, offvalue=0)
b57_3 = ttk.Checkbutton(content, text="8", variable=b57_3var, onvalue=1, offvalue=0)
b57_4 = ttk.Checkbutton(content, text="16", variable=b57_4var, onvalue=1, offvalue=0)
b57_5 = ttk.Checkbutton(content, text="32", variable=b57_5var, onvalue=1, offvalue=0)
b57_7 = ttk.Checkbutton(content, text="HALT", variable=b57_7var, onvalue=1, offvalue=0)

b58_0 = ttk.Checkbutton(content, text="1", variable=b58_0var, onvalue=1, offvalue=0)
b58_1 = ttk.Checkbutton(content, text="2", variable=b58_1var, onvalue=1, offvalue=0)
b58_2 = ttk.Checkbutton(content, text="4", variable=b58_2var, onvalue=1, offvalue=0)
b58_3 = ttk.Checkbutton(content, text="8", variable=b58_3var, onvalue=1, offvalue=0)
b58_4 = ttk.Checkbutton(content, text="16", variable=b58_4var, onvalue=1, offvalue=0)
b58_5 = ttk.Checkbutton(content, text="32", variable=b58_5var, onvalue=1, offvalue=0)
b58_7 = ttk.Checkbutton(content, text="HALT", variable=b58_7var, onvalue=1, offvalue=0)

b59_0 = ttk.Checkbutton(content, text="1", variable=b59_0var, onvalue=1, offvalue=0)
b59_1 = ttk.Checkbutton(content, text="2", variable=b59_1var, onvalue=1, offvalue=0)
b59_2 = ttk.Checkbutton(content, text="4", variable=b59_2var, onvalue=1, offvalue=0)
b59_3 = ttk.Checkbutton(content, text="8", variable=b59_3var, onvalue=1, offvalue=0)
b59_4 = ttk.Checkbutton(content, text="16", variable=b59_4var, onvalue=1, offvalue=0)
b59_5 = ttk.Checkbutton(content, text="32", variable=b59_5var, onvalue=1, offvalue=0)
b59_7 = ttk.Checkbutton(content, text="HALT", variable=b59_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb56_0.grid(column=4, row=143, columnspan=2)
nameb57_0.grid(column=4, row=149, columnspan=2)
nameb58_0.grid(column=4, row=155, columnspan=2)
nameb59_0.grid(column=4, row=161, columnspan=2)

# Placing buttons on grid
b56_0.grid(column=1,row=144)
b56_1.grid(column=2,row=144)
b56_2.grid(column=3,row=144)
b56_3.grid(column=4,row=144)
b56_4.grid(column=5,row=144)
b56_5.grid(column=6,row=144, ipadx=10)
b56_7.grid(column=8,row=144, ipadx=10)

b57_0.grid(column=1,row=150)
b57_1.grid(column=2,row=150)
b57_2.grid(column=3,row=150)
b57_3.grid(column=4,row=150)
b57_4.grid(column=5,row=150)
b57_5.grid(column=6,row=150, ipadx=10)
b57_7.grid(column=8,row=150, ipadx=10)

b58_0.grid(column=1,row=156)
b58_1.grid(column=2,row=156)
b58_2.grid(column=3,row=156)
b58_3.grid(column=4,row=156)
b58_4.grid(column=5,row=156)
b58_5.grid(column=6,row=156, ipadx=10)
b58_7.grid(column=8,row=156, ipadx=10)

b59_0.grid(column=1,row=162)
b59_1.grid(column=2,row=162)
b59_2.grid(column=3,row=162)
b59_3.grid(column=4,row=162)
b59_4.grid(column=5,row=162)
b59_5.grid(column=6,row=162, ipadx=10)
b59_7.grid(column=8,row=162, ipadx=10)

# Group 16

# defining labels
nameb60_0 = ttk.Label(content, text="Note 61", background=c1.get())
nameb61_0 = ttk.Label(content, text="Note 62", background=c1.get())
nameb62_0 = ttk.Label(content, text="Note 63", background=c1.get())
nameb63_0 = ttk.Label(content, text="Note 64", background=c1.get())


# Defining number type
b60_0var = IntVar()
b60_1var = IntVar()
b60_2var = IntVar()
b60_3var = IntVar()
b60_4var = IntVar()
b60_5var = IntVar()
b60_7var = IntVar()

b61_0var = IntVar()
b61_1var = IntVar()
b61_2var = IntVar()
b61_3var = IntVar()
b61_4var = IntVar()
b61_5var = IntVar()
b61_7var = IntVar()

b62_0var = IntVar()
b62_1var = IntVar()
b62_2var = IntVar()
b62_3var = IntVar()
b62_4var = IntVar()
b62_5var = IntVar()
b62_7var = IntVar()

b63_0var = IntVar()
b63_1var = IntVar()
b63_2var = IntVar()
b63_3var = IntVar()
b63_4var = IntVar()
b63_5var = IntVar()
b63_7var = IntVar()

# Setting default button position
b60_0var.set(0)
b60_1var.set(0)
b60_2var.set(0)
b60_3var.set(0)
b60_4var.set(0)
b60_5var.set(0)
b60_7var.set(0)

b61_0var.set(0)
b61_1var.set(0)
b61_2var.set(0)
b61_3var.set(0)
b61_4var.set(0)
b61_5var.set(0)
b61_7var.set(0)

b62_0var.set(0)
b62_1var.set(0)
b62_2var.set(0)
b62_3var.set(0)
b62_4var.set(0)
b62_5var.set(0)
b62_7var.set(0)

b63_0var.set(0)
b63_1var.set(0)
b63_2var.set(0)
b63_3var.set(0)
b63_4var.set(0)
b63_5var.set(0)
b63_7var.set(0)

# Defining button
b60_0 = ttk.Checkbutton(content, text="1", variable=b60_0var, onvalue=1, offvalue=0)
b60_1 = ttk.Checkbutton(content, text="2", variable=b60_1var, onvalue=1, offvalue=0)
b60_2 = ttk.Checkbutton(content, text="4", variable=b60_2var, onvalue=1, offvalue=0)
b60_3 = ttk.Checkbutton(content, text="8", variable=b60_3var, onvalue=1, offvalue=0)
b60_4 = ttk.Checkbutton(content, text="16", variable=b60_4var, onvalue=1, offvalue=0)
b60_5 = ttk.Checkbutton(content, text="32", variable=b60_5var, onvalue=1, offvalue=0)
b60_7 = ttk.Checkbutton(content, text="HALT", variable=b60_7var, onvalue=1, offvalue=0)

b61_0 = ttk.Checkbutton(content, text="1", variable=b61_0var, onvalue=1, offvalue=0)
b61_1 = ttk.Checkbutton(content, text="2", variable=b61_1var, onvalue=1, offvalue=0)
b61_2 = ttk.Checkbutton(content, text="4", variable=b61_2var, onvalue=1, offvalue=0)
b61_3 = ttk.Checkbutton(content, text="8", variable=b61_3var, onvalue=1, offvalue=0)
b61_4 = ttk.Checkbutton(content, text="16", variable=b61_4var, onvalue=1, offvalue=0)
b61_5 = ttk.Checkbutton(content, text="32", variable=b61_5var, onvalue=1, offvalue=0)
b61_7 = ttk.Checkbutton(content, text="HALT", variable=b61_7var, onvalue=1, offvalue=0)

b62_0 = ttk.Checkbutton(content, text="1", variable=b62_0var, onvalue=1, offvalue=0)
b62_1 = ttk.Checkbutton(content, text="2", variable=b62_1var, onvalue=1, offvalue=0)
b62_2 = ttk.Checkbutton(content, text="4", variable=b62_2var, onvalue=1, offvalue=0)
b62_3 = ttk.Checkbutton(content, text="8", variable=b62_3var, onvalue=1, offvalue=0)
b62_4 = ttk.Checkbutton(content, text="16", variable=b62_4var, onvalue=1, offvalue=0)
b62_5 = ttk.Checkbutton(content, text="32", variable=b62_5var, onvalue=1, offvalue=0)
b62_7 = ttk.Checkbutton(content, text="HALT", variable=b62_7var, onvalue=1, offvalue=0)

b63_0 = ttk.Checkbutton(content, text="1", variable=b63_0var, onvalue=1, offvalue=0)
b63_1 = ttk.Checkbutton(content, text="2", variable=b63_1var, onvalue=1, offvalue=0)
b63_2 = ttk.Checkbutton(content, text="4", variable=b63_2var, onvalue=1, offvalue=0)
b63_3 = ttk.Checkbutton(content, text="8", variable=b63_3var, onvalue=1, offvalue=0)
b63_4 = ttk.Checkbutton(content, text="16", variable=b63_4var, onvalue=1, offvalue=0)
b63_5 = ttk.Checkbutton(content, text="32", variable=b63_5var, onvalue=1, offvalue=0)
b63_7 = ttk.Checkbutton(content, text="HALT", variable=b63_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb60_0.grid(column=4, row=167, columnspan=2)
nameb61_0.grid(column=4, row=173, columnspan=2)
nameb62_0.grid(column=4, row=179, columnspan=2)
nameb63_0.grid(column=4, row=185, columnspan=2)

# Placing buttons on grid
b60_0.grid(column=1,row=168)
b60_1.grid(column=2,row=168)
b60_2.grid(column=3,row=168)
b60_3.grid(column=4,row=168)
b60_4.grid(column=5,row=168)
b60_5.grid(column=6,row=168, ipadx=10)
b60_7.grid(column=8,row=168, ipadx=10)

b61_0.grid(column=1,row=174)
b61_1.grid(column=2,row=174)
b61_2.grid(column=3,row=174)
b61_3.grid(column=4,row=174)
b61_4.grid(column=5,row=174)
b61_5.grid(column=6,row=174, ipadx=10)
b61_7.grid(column=8,row=174, ipadx=10)

b62_0.grid(column=1,row=180)
b62_1.grid(column=2,row=180)
b62_2.grid(column=3,row=180)
b62_3.grid(column=4,row=180)
b62_4.grid(column=5,row=180)
b62_5.grid(column=6,row=180, ipadx=10)
b62_7.grid(column=8,row=180, ipadx=10)

b63_0.grid(column=1,row=186)
b63_1.grid(column=2,row=186)
b63_2.grid(column=3,row=186)
b63_3.grid(column=4,row=186)
b63_4.grid(column=5,row=186)
b63_5.grid(column=6,row=186, ipadx=10)
b63_7.grid(column=8,row=186, ipadx=10)


# Group 17

# defining labels
nameb64_0 = ttk.Label(content, text="Note 65", background=c1.get())
nameb65_0 = ttk.Label(content, text="Note 66", background=c1.get())
nameb66_0 = ttk.Label(content, text="Note 67", background=c1.get())
nameb67_0 = ttk.Label(content, text="Note 68", background=c1.get())

# Defining number type
b64_0var = IntVar()
b64_1var = IntVar()
b64_2var = IntVar()
b64_3var = IntVar()
b64_4var = IntVar()
b64_5var = IntVar()
b64_7var = IntVar()

b65_0var = IntVar()
b65_1var = IntVar()
b65_2var = IntVar()
b65_3var = IntVar()
b65_4var = IntVar()
b65_5var = IntVar()
b65_7var = IntVar()

b66_0var = IntVar()
b66_1var = IntVar()
b66_2var = IntVar()
b66_3var = IntVar()
b66_4var = IntVar()
b66_5var = IntVar()
b66_7var = IntVar()

b67_0var = IntVar()
b67_1var = IntVar()
b67_2var = IntVar()
b67_3var = IntVar()
b67_4var = IntVar()
b67_5var = IntVar()
b67_7var = IntVar()

# setting default button position
b64_0var.set(0)
b64_1var.set(0)
b64_2var.set(0)
b64_3var.set(0)
b64_4var.set(0)
b64_5var.set(0)
b64_7var.set(0)

b65_0var.set(0)
b65_1var.set(0)
b65_2var.set(0)
b65_3var.set(0)
b65_4var.set(0)
b65_5var.set(0)
b65_7var.set(0)

b66_0var.set(0)
b66_1var.set(0)
b66_2var.set(0)
b66_3var.set(0)
b66_4var.set(0)
b66_5var.set(0)
b66_7var.set(0)

b67_0var.set(0)
b67_1var.set(0)
b67_2var.set(0)
b67_3var.set(0)
b67_4var.set(0)
b67_5var.set(0)
b67_7var.set(0)

# defining button



b64_0 = ttk.Checkbutton(content, text="1", variable=b64_0var, onvalue=1, offvalue=0)
b64_1 = ttk.Checkbutton(content, text="2", variable=b64_1var, onvalue=1, offvalue=0)
b64_2 = ttk.Checkbutton(content, text="4", variable=b64_2var, onvalue=1, offvalue=0)
b64_3 = ttk.Checkbutton(content, text="8", variable=b64_3var, onvalue=1, offvalue=0)
b64_4 = ttk.Checkbutton(content, text="16", variable=b64_4var, onvalue=1, offvalue=0)
b64_5 = ttk.Checkbutton(content, text="32", variable=b64_5var, onvalue=1, offvalue=0)
b64_7 = ttk.Checkbutton(content, text="HALT", variable=b64_7var, onvalue=1, offvalue=0)

b65_0 = ttk.Checkbutton(content, text="1", variable=b65_0var, onvalue=1, offvalue=0)
b65_1 = ttk.Checkbutton(content, text="2", variable=b65_1var, onvalue=1, offvalue=0)
b65_2 = ttk.Checkbutton(content, text="4", variable=b65_2var, onvalue=1, offvalue=0)
b65_3 = ttk.Checkbutton(content, text="8", variable=b65_3var, onvalue=1, offvalue=0)
b65_4 = ttk.Checkbutton(content, text="16", variable=b65_4var, onvalue=1, offvalue=0)
b65_5 = ttk.Checkbutton(content, text="32", variable=b65_5var, onvalue=1, offvalue=0)
b65_7 = ttk.Checkbutton(content, text="HALT", variable=b65_7var, onvalue=1, offvalue=0)

b66_0 = ttk.Checkbutton(content, text="1", variable=b66_0var, onvalue=1, offvalue=0)
b66_1 = ttk.Checkbutton(content, text="2", variable=b66_1var, onvalue=1, offvalue=0)
b66_2 = ttk.Checkbutton(content, text="4", variable=b66_2var, onvalue=1, offvalue=0)
b66_3 = ttk.Checkbutton(content, text="8", variable=b66_3var, onvalue=1, offvalue=0)
b66_4 = ttk.Checkbutton(content, text="16", variable=b66_4var, onvalue=1, offvalue=0)
b66_5 = ttk.Checkbutton(content, text="32", variable=b66_5var, onvalue=1, offvalue=0)
b66_7 = ttk.Checkbutton(content, text="HALT", variable=b66_7var, onvalue=1, offvalue=0)

b67_0 = ttk.Checkbutton(content, text="1", variable=b67_0var, onvalue=1, offvalue=0)
b67_1 = ttk.Checkbutton(content, text="2", variable=b67_1var, onvalue=1, offvalue=0)
b67_2 = ttk.Checkbutton(content, text="4", variable=b67_2var, onvalue=1, offvalue=0)
b67_3 = ttk.Checkbutton(content, text="8", variable=b67_3var, onvalue=1, offvalue=0)
b67_4 = ttk.Checkbutton(content, text="16", variable=b67_4var, onvalue=1, offvalue=0)
b67_5 = ttk.Checkbutton(content, text="32", variable=b67_5var, onvalue=1, offvalue=0)
b67_7 = ttk.Checkbutton(content, text="HALT", variable=b67_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# placing text above each byte
nameb64_0.grid(column=16, row=95, columnspan=2)
nameb65_0.grid(column=16, row=101, columnspan=2)
nameb66_0.grid(column=16, row=107, columnspan=2)
nameb67_0.grid(column=16, row=113, columnspan=2)


# placing buttons on grid
b64_0.grid(column=13,row=96)
b64_1.grid(column=14,row=96)
b64_2.grid(column=15,row=96)
b64_3.grid(column=16,row=96)
b64_4.grid(column=17,row=96)
b64_5.grid(column=18,row=96, ipadx=10)
b64_7.grid(column=20,row=96, ipadx=10)

b65_0.grid(column=13,row=102)
b65_1.grid(column=14,row=102)
b65_2.grid(column=15,row=102)
b65_3.grid(column=16,row=102)
b65_4.grid(column=17,row=102)
b65_5.grid(column=18,row=102, ipadx=10)
b65_7.grid(column=20,row=102, ipadx=10)

b66_0.grid(column=13,row=108)
b66_1.grid(column=14,row=108)
b66_2.grid(column=15,row=108)
b66_3.grid(column=16,row=108)
b66_4.grid(column=17,row=108)
b66_5.grid(column=18,row=108, ipadx=10)
b66_7.grid(column=20,row=108, ipadx=10)

b67_0.grid(column=13,row=114)
b67_1.grid(column=14,row=114)
b67_2.grid(column=15,row=114)
b67_3.grid(column=16,row=114)
b67_4.grid(column=17,row=114)
b67_5.grid(column=18,row=114, ipadx=10)
b67_7.grid(column=20,row=114, ipadx=10)


# group 18

# defining labels
nameb68_0 = ttk.Label(content, text="Note 69", background=c1.get())
nameb69_0 = ttk.Label(content, text="Note 70", background=c1.get())
nameb70_0 = ttk.Label(content, text="Note 71", background=c1.get())
nameb71_0 = ttk.Label(content, text="Note 72", background=c1.get())


# Defining number type
b68_0var = IntVar()
b68_1var = IntVar()
b68_2var = IntVar()
b68_3var = IntVar()
b68_4var = IntVar()
b68_5var = IntVar()
b68_7var = IntVar()

b69_0var = IntVar()
b69_1var = IntVar()
b69_2var = IntVar()
b69_3var = IntVar()
b69_4var = IntVar()
b69_5var = IntVar()
b69_7var = IntVar()

b70_0var = IntVar()
b70_1var = IntVar()
b70_2var = IntVar()
b70_3var = IntVar()
b70_4var = IntVar()
b70_5var = IntVar()
b70_7var = IntVar()

b71_0var = IntVar()
b71_1var = IntVar()
b71_2var = IntVar()
b71_3var = IntVar()
b71_4var = IntVar()
b71_5var = IntVar()
b71_7var = IntVar()

# Setting default button position
b68_0var.set(0)
b68_1var.set(0)
b68_2var.set(0)
b68_3var.set(0)
b68_4var.set(0)
b68_5var.set(0)
b68_7var.set(0)

b69_0var.set(0)
b69_1var.set(0)
b69_2var.set(0)
b69_3var.set(0)
b69_4var.set(0)
b69_5var.set(0)
b69_7var.set(0)

b70_0var.set(0)
b70_1var.set(0)
b70_2var.set(0)
b70_3var.set(0)
b70_4var.set(0)
b70_5var.set(0)
b70_7var.set(0)

b71_0var.set(0)
b71_1var.set(0)
b71_2var.set(0)
b71_3var.set(0)
b71_4var.set(0)
b71_5var.set(0)
b71_7var.set(0)

# Defining button
b68_0 = ttk.Checkbutton(content, text="1", variable=b68_0var, onvalue=1, offvalue=0)
b68_1 = ttk.Checkbutton(content, text="2", variable=b68_1var, onvalue=1, offvalue=0)
b68_2 = ttk.Checkbutton(content, text="4", variable=b68_2var, onvalue=1, offvalue=0)
b68_3 = ttk.Checkbutton(content, text="8", variable=b68_3var, onvalue=1, offvalue=0)
b68_4 = ttk.Checkbutton(content, text="16", variable=b68_4var, onvalue=1, offvalue=0)
b68_5 = ttk.Checkbutton(content, text="32", variable=b68_5var, onvalue=1, offvalue=0)
b68_7 = ttk.Checkbutton(content, text="HALT", variable=b68_7var, onvalue=1, offvalue=0)

b69_0 = ttk.Checkbutton(content, text="1", variable=b69_0var, onvalue=1, offvalue=0)
b69_1 = ttk.Checkbutton(content, text="2", variable=b69_1var, onvalue=1, offvalue=0)
b69_2 = ttk.Checkbutton(content, text="4", variable=b69_2var, onvalue=1, offvalue=0)
b69_3 = ttk.Checkbutton(content, text="8", variable=b69_3var, onvalue=1, offvalue=0)
b69_4 = ttk.Checkbutton(content, text="16", variable=b69_4var, onvalue=1, offvalue=0)
b69_5 = ttk.Checkbutton(content, text="32", variable=b69_5var, onvalue=1, offvalue=0)
b69_7 = ttk.Checkbutton(content, text="HALT", variable=b69_7var, onvalue=1, offvalue=0)

b70_0 = ttk.Checkbutton(content, text="1", variable=b70_0var, onvalue=1, offvalue=0)
b70_1 = ttk.Checkbutton(content, text="2", variable=b70_1var, onvalue=1, offvalue=0)
b70_2 = ttk.Checkbutton(content, text="4", variable=b70_2var, onvalue=1, offvalue=0)
b70_3 = ttk.Checkbutton(content, text="8", variable=b70_3var, onvalue=1, offvalue=0)
b70_4 = ttk.Checkbutton(content, text="16", variable=b70_4var, onvalue=1, offvalue=0)
b70_5 = ttk.Checkbutton(content, text="32", variable=b70_5var, onvalue=1, offvalue=0)
b70_7 = ttk.Checkbutton(content, text="HALT", variable=b70_7var, onvalue=1, offvalue=0)

b71_0 = ttk.Checkbutton(content, text="1", variable=b71_0var, onvalue=1, offvalue=0)
b71_1 = ttk.Checkbutton(content, text="2", variable=b71_1var, onvalue=1, offvalue=0)
b71_2 = ttk.Checkbutton(content, text="4", variable=b71_2var, onvalue=1, offvalue=0)
b71_3 = ttk.Checkbutton(content, text="8", variable=b71_3var, onvalue=1, offvalue=0)
b71_4 = ttk.Checkbutton(content, text="16", variable=b71_4var, onvalue=1, offvalue=0)
b71_5 = ttk.Checkbutton(content, text="32", variable=b71_5var, onvalue=1, offvalue=0)
b71_7 = ttk.Checkbutton(content, text="HALT", variable=b71_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb68_0.grid(column=16, row=119, columnspan=2)
nameb69_0.grid(column=16, row=125, columnspan=2)
nameb70_0.grid(column=16, row=131, columnspan=2)
nameb71_0.grid(column=16, row=137, columnspan=2)

# Placing buttons on grid
b68_0.grid(column=13,row=120)
b68_1.grid(column=14,row=120)
b68_2.grid(column=15,row=120)
b68_3.grid(column=16,row=120)
b68_4.grid(column=17,row=120)
b68_5.grid(column=18,row=120, ipadx=10)
b68_7.grid(column=20,row=120, ipadx=10)

b69_0.grid(column=13,row=126)
b69_1.grid(column=14,row=126)
b69_2.grid(column=15,row=126)
b69_3.grid(column=16,row=126)
b69_4.grid(column=17,row=126)
b69_5.grid(column=18,row=126, ipadx=10)
b69_7.grid(column=20,row=126, ipadx=10)

b70_0.grid(column=13,row=132)
b70_1.grid(column=14,row=132)
b70_2.grid(column=15,row=132)
b70_3.grid(column=16,row=132)
b70_4.grid(column=17,row=132)
b70_5.grid(column=18,row=132, ipadx=10)
b70_7.grid(column=20,row=132, ipadx=10)

b71_0.grid(column=13,row=138)
b71_1.grid(column=14,row=138)
b71_2.grid(column=15,row=138)
b71_3.grid(column=16,row=138)
b71_4.grid(column=17,row=138)
b71_5.grid(column=18,row=138, ipadx=10)
b71_7.grid(column=20,row=138, ipadx=10)

# Group 19

# defining labels
nameb72_0 = ttk.Label(content, text="Note 73", background=c1.get())
nameb73_0 = ttk.Label(content, text="Note 74", background=c1.get())
nameb74_0 = ttk.Label(content, text="Note 75", background=c1.get())
nameb75_0 = ttk.Label(content, text="Note 76", background=c1.get())


# Defining number type
b72_0var = IntVar()
b72_1var = IntVar()
b72_2var = IntVar()
b72_3var = IntVar()
b72_4var = IntVar()
b72_5var = IntVar()
b72_7var = IntVar()

b73_0var = IntVar()
b73_1var = IntVar()
b73_2var = IntVar()
b73_3var = IntVar()
b73_4var = IntVar()
b73_5var = IntVar()
b73_7var = IntVar()

b74_0var = IntVar()
b74_1var = IntVar()
b74_2var = IntVar()
b74_3var = IntVar()
b74_4var = IntVar()
b74_5var = IntVar()
b74_7var = IntVar()

b75_0var = IntVar()
b75_1var = IntVar()
b75_2var = IntVar()
b75_3var = IntVar()
b75_4var = IntVar()
b75_5var = IntVar()
b75_7var = IntVar()

# Setting default button position
b72_0var.set(0)
b72_1var.set(0)
b72_2var.set(0)
b72_3var.set(0)
b72_4var.set(0)
b72_5var.set(0)
b72_7var.set(0)

b73_0var.set(0)
b73_1var.set(0)
b73_2var.set(0)
b73_3var.set(0)
b73_4var.set(0)
b73_5var.set(0)
b73_7var.set(0)

b74_0var.set(0)
b74_1var.set(0)
b74_2var.set(0)
b74_3var.set(0)
b74_4var.set(0)
b74_5var.set(0)
b74_7var.set(0)

b75_0var.set(0)
b75_1var.set(0)
b75_2var.set(0)
b75_3var.set(0)
b75_4var.set(0)
b75_5var.set(0)
b75_7var.set(0)

# Defining button
b72_0 = ttk.Checkbutton(content, text="1", variable=b72_0var, onvalue=1, offvalue=0)
b72_1 = ttk.Checkbutton(content, text="2", variable=b72_1var, onvalue=1, offvalue=0)
b72_2 = ttk.Checkbutton(content, text="4", variable=b72_2var, onvalue=1, offvalue=0)
b72_3 = ttk.Checkbutton(content, text="8", variable=b72_3var, onvalue=1, offvalue=0)
b72_4 = ttk.Checkbutton(content, text="16", variable=b72_4var, onvalue=1, offvalue=0)
b72_5 = ttk.Checkbutton(content, text="32", variable=b72_5var, onvalue=1, offvalue=0)
b72_7 = ttk.Checkbutton(content, text="HALT", variable=b72_7var, onvalue=1, offvalue=0)

b73_0 = ttk.Checkbutton(content, text="1", variable=b73_0var, onvalue=1, offvalue=0)
b73_1 = ttk.Checkbutton(content, text="2", variable=b73_1var, onvalue=1, offvalue=0)
b73_2 = ttk.Checkbutton(content, text="4", variable=b73_2var, onvalue=1, offvalue=0)
b73_3 = ttk.Checkbutton(content, text="8", variable=b73_3var, onvalue=1, offvalue=0)
b73_4 = ttk.Checkbutton(content, text="16", variable=b73_4var, onvalue=1, offvalue=0)
b73_5 = ttk.Checkbutton(content, text="32", variable=b73_5var, onvalue=1, offvalue=0)
b73_7 = ttk.Checkbutton(content, text="HALT", variable=b73_7var, onvalue=1, offvalue=0)

b74_0 = ttk.Checkbutton(content, text="1", variable=b74_0var, onvalue=1, offvalue=0)
b74_1 = ttk.Checkbutton(content, text="2", variable=b74_1var, onvalue=1, offvalue=0)
b74_2 = ttk.Checkbutton(content, text="4", variable=b74_2var, onvalue=1, offvalue=0)
b74_3 = ttk.Checkbutton(content, text="8", variable=b74_3var, onvalue=1, offvalue=0)
b74_4 = ttk.Checkbutton(content, text="16", variable=b74_4var, onvalue=1, offvalue=0)
b74_5 = ttk.Checkbutton(content, text="32", variable=b74_5var, onvalue=1, offvalue=0)
b74_7 = ttk.Checkbutton(content, text="HALT", variable=b74_7var, onvalue=1, offvalue=0)

b75_0 = ttk.Checkbutton(content, text="1", variable=b75_0var, onvalue=1, offvalue=0)
b75_1 = ttk.Checkbutton(content, text="2", variable=b75_1var, onvalue=1, offvalue=0)
b75_2 = ttk.Checkbutton(content, text="4", variable=b75_2var, onvalue=1, offvalue=0)
b75_3 = ttk.Checkbutton(content, text="8", variable=b75_3var, onvalue=1, offvalue=0)
b75_4 = ttk.Checkbutton(content, text="16", variable=b75_4var, onvalue=1, offvalue=0)
b75_5 = ttk.Checkbutton(content, text="32", variable=b75_5var, onvalue=1, offvalue=0)
b75_7 = ttk.Checkbutton(content, text="HALT", variable=b75_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb72_0.grid(column=16, row=143, columnspan=2)
nameb73_0.grid(column=16, row=149, columnspan=2)
nameb74_0.grid(column=16, row=155, columnspan=2)
nameb75_0.grid(column=16, row=161, columnspan=2)

# Placing buttons on grid
b72_0.grid(column=13,row=144)
b72_1.grid(column=14,row=144)
b72_2.grid(column=15,row=144)
b72_3.grid(column=16,row=144)
b72_4.grid(column=17,row=144)
b72_5.grid(column=18,row=144, ipadx=10)
b72_7.grid(column=20,row=144, ipadx=10)

b73_0.grid(column=13,row=150)
b73_1.grid(column=14,row=150)
b73_2.grid(column=15,row=150)
b73_3.grid(column=16,row=150)
b73_4.grid(column=17,row=150)
b73_5.grid(column=18,row=150, ipadx=10)
b73_7.grid(column=20,row=150, ipadx=10)

b74_0.grid(column=13,row=156)
b74_1.grid(column=14,row=156)
b74_2.grid(column=15,row=156)
b74_3.grid(column=16,row=156)
b74_4.grid(column=17,row=156)
b74_5.grid(column=18,row=156, ipadx=10)
b74_7.grid(column=20,row=156, ipadx=10)

b75_0.grid(column=13,row=162)
b75_1.grid(column=14,row=162)
b75_2.grid(column=15,row=162)
b75_3.grid(column=16,row=162)
b75_4.grid(column=17,row=162)
b75_5.grid(column=18,row=162, ipadx=10)
b75_7.grid(column=20,row=162, ipadx=10)

# Group 20

# defining labels
nameb76_0 = ttk.Label(content, text="Note 77", background=c1.get())
nameb77_0 = ttk.Label(content, text="Note 78", background=c1.get())
nameb78_0 = ttk.Label(content, text="Note 79", background=c1.get())
nameb79_0 = ttk.Label(content, text="Note 80", background=c1.get())


# Defining number type
b76_0var = IntVar()
b76_1var = IntVar()
b76_2var = IntVar()
b76_3var = IntVar()
b76_4var = IntVar()
b76_5var = IntVar()
b76_7var = IntVar()

b77_0var = IntVar()
b77_1var = IntVar()
b77_2var = IntVar()
b77_3var = IntVar()
b77_4var = IntVar()
b77_5var = IntVar()
b77_7var = IntVar()

b78_0var = IntVar()
b78_1var = IntVar()
b78_2var = IntVar()
b78_3var = IntVar()
b78_4var = IntVar()
b78_5var = IntVar()
b78_7var = IntVar()

b79_0var = IntVar()
b79_1var = IntVar()
b79_2var = IntVar()
b79_3var = IntVar()
b79_4var = IntVar()
b79_5var = IntVar()
b79_7var = IntVar()

# Setting default button position
b76_0var.set(0)
b76_1var.set(0)
b76_2var.set(0)
b76_3var.set(0)
b76_4var.set(0)
b76_5var.set(0)
b76_7var.set(0)

b77_0var.set(0)
b77_1var.set(0)
b77_2var.set(0)
b77_3var.set(0)
b77_4var.set(0)
b77_5var.set(0)
b77_7var.set(0)

b78_0var.set(0)
b78_1var.set(0)
b78_2var.set(0)
b78_3var.set(0)
b78_4var.set(0)
b78_5var.set(0)
b78_7var.set(0)

b79_0var.set(0)
b79_1var.set(0)
b79_2var.set(0)
b79_3var.set(0)
b79_4var.set(0)
b79_5var.set(0)
b79_7var.set(0)

# Defining button
b76_0 = ttk.Checkbutton(content, text="1", variable=b76_0var, onvalue=1, offvalue=0)
b76_1 = ttk.Checkbutton(content, text="2", variable=b76_1var, onvalue=1, offvalue=0)
b76_2 = ttk.Checkbutton(content, text="4", variable=b76_2var, onvalue=1, offvalue=0)
b76_3 = ttk.Checkbutton(content, text="8", variable=b76_3var, onvalue=1, offvalue=0)
b76_4 = ttk.Checkbutton(content, text="16", variable=b76_4var, onvalue=1, offvalue=0)
b76_5 = ttk.Checkbutton(content, text="32", variable=b76_5var, onvalue=1, offvalue=0)
b76_7 = ttk.Checkbutton(content, text="HALT", variable=b76_7var, onvalue=1, offvalue=0)

b77_0 = ttk.Checkbutton(content, text="1", variable=b77_0var, onvalue=1, offvalue=0)
b77_1 = ttk.Checkbutton(content, text="2", variable=b77_1var, onvalue=1, offvalue=0)
b77_2 = ttk.Checkbutton(content, text="4", variable=b77_2var, onvalue=1, offvalue=0)
b77_3 = ttk.Checkbutton(content, text="8", variable=b77_3var, onvalue=1, offvalue=0)
b77_4 = ttk.Checkbutton(content, text="16", variable=b77_4var, onvalue=1, offvalue=0)
b77_5 = ttk.Checkbutton(content, text="32", variable=b77_5var, onvalue=1, offvalue=0)
b77_7 = ttk.Checkbutton(content, text="HALT", variable=b77_7var, onvalue=1, offvalue=0)

b78_0 = ttk.Checkbutton(content, text="1", variable=b78_0var, onvalue=1, offvalue=0)
b78_1 = ttk.Checkbutton(content, text="2", variable=b78_1var, onvalue=1, offvalue=0)
b78_2 = ttk.Checkbutton(content, text="4", variable=b78_2var, onvalue=1, offvalue=0)
b78_3 = ttk.Checkbutton(content, text="8", variable=b78_3var, onvalue=1, offvalue=0)
b78_4 = ttk.Checkbutton(content, text="16", variable=b78_4var, onvalue=1, offvalue=0)
b78_5 = ttk.Checkbutton(content, text="32", variable=b78_5var, onvalue=1, offvalue=0)
b78_7 = ttk.Checkbutton(content, text="HALT", variable=b78_7var, onvalue=1, offvalue=0)

b79_0 = ttk.Checkbutton(content, text="1", variable=b79_0var, onvalue=1, offvalue=0)
b79_1 = ttk.Checkbutton(content, text="2", variable=b79_1var, onvalue=1, offvalue=0)
b79_2 = ttk.Checkbutton(content, text="4", variable=b79_2var, onvalue=1, offvalue=0)
b79_3 = ttk.Checkbutton(content, text="8", variable=b79_3var, onvalue=1, offvalue=0)
b79_4 = ttk.Checkbutton(content, text="16", variable=b79_4var, onvalue=1, offvalue=0)
b79_5 = ttk.Checkbutton(content, text="32", variable=b79_5var, onvalue=1, offvalue=0)
b79_7 = ttk.Checkbutton(content, text="HALT", variable=b79_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb76_0.grid(column=16, row=167, columnspan=2)
nameb77_0.grid(column=16, row=173, columnspan=2)
nameb78_0.grid(column=16, row=179, columnspan=2)
nameb79_0.grid(column=16, row=185, columnspan=2)


# Placing buttons on grid
b76_0.grid(column=13,row=168)
b76_1.grid(column=14,row=168)
b76_2.grid(column=15,row=168)
b76_3.grid(column=16,row=168)
b76_4.grid(column=17,row=168)
b76_5.grid(column=18,row=168, ipadx=10)
b76_7.grid(column=20,row=168, ipadx=10)

b77_0.grid(column=13,row=174)
b77_1.grid(column=14,row=174)
b77_2.grid(column=15,row=174)
b77_3.grid(column=16,row=174)
b77_4.grid(column=17,row=174)
b77_5.grid(column=18,row=174, ipadx=10)
b77_7.grid(column=20,row=174, ipadx=10)

b78_0.grid(column=13,row=180)
b78_1.grid(column=14,row=180)
b78_2.grid(column=15,row=180)
b78_3.grid(column=16,row=180)
b78_4.grid(column=17,row=180)
b78_5.grid(column=18,row=180, ipadx=10)
b78_7.grid(column=20,row=180, ipadx=10)

b79_0.grid(column=13,row=186)
b79_1.grid(column=14,row=186)
b79_2.grid(column=15,row=186)
b79_3.grid(column=16,row=186)
b79_4.grid(column=17,row=186)
b79_5.grid(column=18,row=186, ipadx=10)
b79_7.grid(column=20,row=186, ipadx=10)

# Group 21

# defining labels
nameb80_0 = ttk.Label(content, text="Note 81", background=c1.get())
nameb81_0 = ttk.Label(content, text="Note 82", background=c1.get())
nameb82_0 = ttk.Label(content, text="Note 83", background=c1.get())
nameb83_0 = ttk.Label(content, text="Note 84", background=c1.get())


# Defining number type
b80_0var = IntVar()
b80_1var = IntVar()
b80_2var = IntVar()
b80_3var = IntVar()
b80_4var = IntVar()
b80_5var = IntVar()
b80_7var = IntVar()

b81_0var = IntVar()
b81_1var = IntVar()
b81_2var = IntVar()
b81_3var = IntVar()
b81_4var = IntVar()
b81_5var = IntVar()
b81_7var = IntVar()

b82_0var = IntVar()
b82_1var = IntVar()
b82_2var = IntVar()
b82_3var = IntVar()
b82_4var = IntVar()
b82_5var = IntVar()
b82_7var = IntVar()

b83_0var = IntVar()
b83_1var = IntVar()
b83_2var = IntVar()
b83_3var = IntVar()
b83_4var = IntVar()
b83_5var = IntVar()
b83_7var = IntVar()

# Setting default button position
b80_0var.set(0)
b80_1var.set(0)
b80_2var.set(0)
b80_3var.set(0)
b80_4var.set(0)
b80_5var.set(0)
b80_7var.set(0)

b81_0var.set(0)
b81_1var.set(0)
b81_2var.set(0)
b81_3var.set(0)
b81_4var.set(0)
b81_5var.set(0)
b81_7var.set(0)

b82_0var.set(0)
b82_1var.set(0)
b82_2var.set(0)
b82_3var.set(0)
b82_4var.set(0)
b82_5var.set(0)
b82_7var.set(0)

b83_0var.set(0)
b83_1var.set(0)
b83_2var.set(0)
b83_3var.set(0)
b83_4var.set(0)
b83_5var.set(0)
b83_7var.set(0)

# Defining button
b80_0 = ttk.Checkbutton(content, text="1", variable=b80_0var, onvalue=1, offvalue=0)
b80_1 = ttk.Checkbutton(content, text="2", variable=b80_1var, onvalue=1, offvalue=0)
b80_2 = ttk.Checkbutton(content, text="4", variable=b80_2var, onvalue=1, offvalue=0)
b80_3 = ttk.Checkbutton(content, text="8", variable=b80_3var, onvalue=1, offvalue=0)
b80_4 = ttk.Checkbutton(content, text="16", variable=b80_4var, onvalue=1, offvalue=0)
b80_5 = ttk.Checkbutton(content, text="32", variable=b80_5var, onvalue=1, offvalue=0)
b80_7 = ttk.Checkbutton(content, text="HALT", variable=b80_7var, onvalue=1, offvalue=0)

b81_0 = ttk.Checkbutton(content, text="1", variable=b81_0var, onvalue=1, offvalue=0)
b81_1 = ttk.Checkbutton(content, text="2", variable=b81_1var, onvalue=1, offvalue=0)
b81_2 = ttk.Checkbutton(content, text="4", variable=b81_2var, onvalue=1, offvalue=0)
b81_3 = ttk.Checkbutton(content, text="8", variable=b81_3var, onvalue=1, offvalue=0)
b81_4 = ttk.Checkbutton(content, text="16", variable=b81_4var, onvalue=1, offvalue=0)
b81_5 = ttk.Checkbutton(content, text="32", variable=b81_5var, onvalue=1, offvalue=0)
b81_7 = ttk.Checkbutton(content, text="HALT", variable=b81_7var, onvalue=1, offvalue=0)

b82_0 = ttk.Checkbutton(content, text="1", variable=b82_0var, onvalue=1, offvalue=0)
b82_1 = ttk.Checkbutton(content, text="2", variable=b82_1var, onvalue=1, offvalue=0)
b82_2 = ttk.Checkbutton(content, text="4", variable=b82_2var, onvalue=1, offvalue=0)
b82_3 = ttk.Checkbutton(content, text="8", variable=b82_3var, onvalue=1, offvalue=0)
b82_4 = ttk.Checkbutton(content, text="16", variable=b82_4var, onvalue=1, offvalue=0)
b82_5 = ttk.Checkbutton(content, text="32", variable=b82_5var, onvalue=1, offvalue=0)
b82_7 = ttk.Checkbutton(content, text="HALT", variable=b82_7var, onvalue=1, offvalue=0)

b83_0 = ttk.Checkbutton(content, text="1", variable=b83_0var, onvalue=1, offvalue=0)
b83_1 = ttk.Checkbutton(content, text="2", variable=b83_1var, onvalue=1, offvalue=0)
b83_2 = ttk.Checkbutton(content, text="4", variable=b83_2var, onvalue=1, offvalue=0)
b83_3 = ttk.Checkbutton(content, text="8", variable=b83_3var, onvalue=1, offvalue=0)
b83_4 = ttk.Checkbutton(content, text="16", variable=b83_4var, onvalue=1, offvalue=0)
b83_5 = ttk.Checkbutton(content, text="32", variable=b83_5var, onvalue=1, offvalue=0)
b83_7 = ttk.Checkbutton(content, text="HALT", variable=b83_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb80_0.grid(column=28, row=95, columnspan=2)
nameb81_0.grid(column=28, row=101, columnspan=2)
nameb82_0.grid(column=28, row=107, columnspan=2)
nameb83_0.grid(column=28, row=113, columnspan=2)

# Placing buttons on grid
b80_0.grid(column=25,row=96)
b80_1.grid(column=26,row=96)
b80_2.grid(column=27,row=96)
b80_3.grid(column=28,row=96)
b80_4.grid(column=29,row=96)
b80_5.grid(column=30,row=96, ipadx=10)
b80_7.grid(column=32,row=96, ipadx=10)

b81_0.grid(column=25,row=102)
b81_1.grid(column=26,row=102)
b81_2.grid(column=27,row=102)
b81_3.grid(column=28,row=102)
b81_4.grid(column=29,row=102)
b81_5.grid(column=30,row=102, ipadx=10)
b81_7.grid(column=32,row=102, ipadx=10)

b82_0.grid(column=25,row=108)
b82_1.grid(column=26,row=108)
b82_2.grid(column=27,row=108)
b82_3.grid(column=28,row=108)
b82_4.grid(column=29,row=108)
b82_5.grid(column=30,row=108, ipadx=10)
b82_7.grid(column=32,row=108, ipadx=10)

b83_0.grid(column=25,row=114)
b83_1.grid(column=26,row=114)
b83_2.grid(column=27,row=114)
b83_3.grid(column=28,row=114)
b83_4.grid(column=29,row=114)
b83_5.grid(column=30,row=114, ipadx=10)
b83_7.grid(column=32,row=114, ipadx=10)

# Group 22

# defining labels
nameb84_0 = ttk.Label(content, text="Note 85", background=c1.get())
nameb85_0 = ttk.Label(content, text="Note 86", background=c1.get())
nameb86_0 = ttk.Label(content, text="Note 87", background=c1.get())
nameb87_0 = ttk.Label(content, text="Note 88", background=c1.get())


# Defining number type
b84_0var = IntVar()
b84_1var = IntVar()
b84_2var = IntVar()
b84_3var = IntVar()
b84_4var = IntVar()
b84_5var = IntVar()
b84_7var = IntVar()

b85_0var = IntVar()
b85_1var = IntVar()
b85_2var = IntVar()
b85_3var = IntVar()
b85_4var = IntVar()
b85_5var = IntVar()
b85_7var = IntVar()

b86_0var = IntVar()
b86_1var = IntVar()
b86_2var = IntVar()
b86_3var = IntVar()
b86_4var = IntVar()
b86_5var = IntVar()
b86_7var = IntVar()

b87_0var = IntVar()
b87_1var = IntVar()
b87_2var = IntVar()
b87_3var = IntVar()
b87_4var = IntVar()
b87_5var = IntVar()
b87_7var = IntVar()

# Setting default button position
b84_0var.set(0)
b84_1var.set(0)
b84_2var.set(0)
b84_3var.set(0)
b84_4var.set(0)
b84_5var.set(0)
b84_7var.set(0)

b85_0var.set(0)
b85_1var.set(0)
b85_2var.set(0)
b85_3var.set(0)
b85_4var.set(0)
b85_5var.set(0)
b85_7var.set(0)

b86_0var.set(0)
b86_1var.set(0)
b86_2var.set(0)
b86_3var.set(0)
b86_4var.set(0)
b86_5var.set(0)
b86_7var.set(0)

b87_0var.set(0)
b87_1var.set(0)
b87_2var.set(0)
b87_3var.set(0)
b87_4var.set(0)
b87_5var.set(0)
b87_7var.set(0)

# Defining button
b84_0 = ttk.Checkbutton(content, text="1", variable=b84_0var, onvalue=1, offvalue=0)
b84_1 = ttk.Checkbutton(content, text="2", variable=b84_1var, onvalue=1, offvalue=0)
b84_2 = ttk.Checkbutton(content, text="4", variable=b84_2var, onvalue=1, offvalue=0)
b84_3 = ttk.Checkbutton(content, text="8", variable=b84_3var, onvalue=1, offvalue=0)
b84_4 = ttk.Checkbutton(content, text="16", variable=b84_4var, onvalue=1, offvalue=0)
b84_5 = ttk.Checkbutton(content, text="32", variable=b84_5var, onvalue=1, offvalue=0)
b84_7 = ttk.Checkbutton(content, text="HALT", variable=b84_7var, onvalue=1, offvalue=0)

b85_0 = ttk.Checkbutton(content, text="1", variable=b85_0var, onvalue=1, offvalue=0)
b85_1 = ttk.Checkbutton(content, text="2", variable=b85_1var, onvalue=1, offvalue=0)
b85_2 = ttk.Checkbutton(content, text="4", variable=b85_2var, onvalue=1, offvalue=0)
b85_3 = ttk.Checkbutton(content, text="8", variable=b85_3var, onvalue=1, offvalue=0)
b85_4 = ttk.Checkbutton(content, text="16", variable=b85_4var, onvalue=1, offvalue=0)
b85_5 = ttk.Checkbutton(content, text="32", variable=b85_5var, onvalue=1, offvalue=0)
b85_7 = ttk.Checkbutton(content, text="HALT", variable=b85_7var, onvalue=1, offvalue=0)

b86_0 = ttk.Checkbutton(content, text="1", variable=b86_0var, onvalue=1, offvalue=0)
b86_1 = ttk.Checkbutton(content, text="2", variable=b86_1var, onvalue=1, offvalue=0)
b86_2 = ttk.Checkbutton(content, text="4", variable=b86_2var, onvalue=1, offvalue=0)
b86_3 = ttk.Checkbutton(content, text="8", variable=b86_3var, onvalue=1, offvalue=0)
b86_4 = ttk.Checkbutton(content, text="16", variable=b86_4var, onvalue=1, offvalue=0)
b86_5 = ttk.Checkbutton(content, text="32", variable=b86_5var, onvalue=1, offvalue=0)
b86_7 = ttk.Checkbutton(content, text="HALT", variable=b86_7var, onvalue=1, offvalue=0)

b87_0 = ttk.Checkbutton(content, text="1", variable=b87_0var, onvalue=1, offvalue=0)
b87_1 = ttk.Checkbutton(content, text="2", variable=b87_1var, onvalue=1, offvalue=0)
b87_2 = ttk.Checkbutton(content, text="4", variable=b87_2var, onvalue=1, offvalue=0)
b87_3 = ttk.Checkbutton(content, text="8", variable=b87_3var, onvalue=1, offvalue=0)
b87_4 = ttk.Checkbutton(content, text="16", variable=b87_4var, onvalue=1, offvalue=0)
b87_5 = ttk.Checkbutton(content, text="32", variable=b87_5var, onvalue=1, offvalue=0)
b87_7 = ttk.Checkbutton(content, text="HALT", variable=b87_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb84_0.grid(column=28, row=119, columnspan=2)
nameb85_0.grid(column=28, row=125, columnspan=2)
nameb86_0.grid(column=28, row=131, columnspan=2)
nameb87_0.grid(column=28, row=137, columnspan=2)

# Placing buttons on grid
b84_0.grid(column=25,row=120)
b84_1.grid(column=26,row=120)
b84_2.grid(column=27,row=120)
b84_3.grid(column=28,row=120)
b84_4.grid(column=29,row=120)
b84_5.grid(column=30,row=120, ipadx=10)
b84_7.grid(column=32,row=120, ipadx=10)

b85_0.grid(column=25,row=126)
b85_1.grid(column=26,row=126)
b85_2.grid(column=27,row=126)
b85_3.grid(column=28,row=126)
b85_4.grid(column=29,row=126)
b85_5.grid(column=30,row=126, ipadx=10)
b85_7.grid(column=32,row=126, ipadx=10)

b86_0.grid(column=25,row=132)
b86_1.grid(column=26,row=132)
b86_2.grid(column=27,row=132)
b86_3.grid(column=28,row=132)
b86_4.grid(column=29,row=132)
b86_5.grid(column=30,row=132, ipadx=10)
b86_7.grid(column=32,row=132, ipadx=10)

b87_0.grid(column=25,row=138)
b87_1.grid(column=26,row=138)
b87_2.grid(column=27,row=138)
b87_3.grid(column=28,row=138)
b87_4.grid(column=29,row=138)
b87_5.grid(column=30,row=138, ipadx=10)
b87_7.grid(column=32,row=138, ipadx=10)

# Group 23

# defining labels
nameb88_0 = ttk.Label(content, text="Note 89", background=c1.get())
nameb89_0 = ttk.Label(content, text="Note 90", background=c1.get())
nameb90_0 = ttk.Label(content, text="Note 91", background=c1.get())
nameb91_0 = ttk.Label(content, text="Note 92", background=c1.get())


# Defining number type
b88_0var = IntVar()
b88_1var = IntVar()
b88_2var = IntVar()
b88_3var = IntVar()
b88_4var = IntVar()
b88_5var = IntVar()
b88_7var = IntVar()

b89_0var = IntVar()
b89_1var = IntVar()
b89_2var = IntVar()
b89_3var = IntVar()
b89_4var = IntVar()
b89_5var = IntVar()
b89_7var = IntVar()

b90_0var = IntVar()
b90_1var = IntVar()
b90_2var = IntVar()
b90_3var = IntVar()
b90_4var = IntVar()
b90_5var = IntVar()
b90_7var = IntVar()

b91_0var = IntVar()
b91_1var = IntVar()
b91_2var = IntVar()
b91_3var = IntVar()
b91_4var = IntVar()
b91_5var = IntVar()
b91_7var = IntVar()

# Setting default button position
b88_0var.set(0)
b88_1var.set(0)
b88_2var.set(0)
b88_3var.set(0)
b88_4var.set(0)
b88_5var.set(0)
b88_7var.set(0)

b89_0var.set(0)
b89_1var.set(0)
b89_2var.set(0)
b89_3var.set(0)
b89_4var.set(0)
b89_5var.set(0)
b89_7var.set(0)

b90_0var.set(0)
b90_1var.set(0)
b90_2var.set(0)
b90_3var.set(0)
b90_4var.set(0)
b90_5var.set(0)
b90_7var.set(0)

b91_0var.set(0)
b91_1var.set(0)
b91_2var.set(0)
b91_3var.set(0)
b91_4var.set(0)
b91_5var.set(0)
b91_7var.set(0)

# Defining button
b88_0 = ttk.Checkbutton(content, text="1", variable=b88_0var, onvalue=1, offvalue=0)
b88_1 = ttk.Checkbutton(content, text="2", variable=b88_1var, onvalue=1, offvalue=0)
b88_2 = ttk.Checkbutton(content, text="4", variable=b88_2var, onvalue=1, offvalue=0)
b88_3 = ttk.Checkbutton(content, text="8", variable=b88_3var, onvalue=1, offvalue=0)
b88_4 = ttk.Checkbutton(content, text="16", variable=b88_4var, onvalue=1, offvalue=0)
b88_5 = ttk.Checkbutton(content, text="32", variable=b88_5var, onvalue=1, offvalue=0)
b88_7 = ttk.Checkbutton(content, text="HALT", variable=b88_7var, onvalue=1, offvalue=0)

b89_0 = ttk.Checkbutton(content, text="1", variable=b89_0var, onvalue=1, offvalue=0)
b89_1 = ttk.Checkbutton(content, text="2", variable=b89_1var, onvalue=1, offvalue=0)
b89_2 = ttk.Checkbutton(content, text="4", variable=b89_2var, onvalue=1, offvalue=0)
b89_3 = ttk.Checkbutton(content, text="8", variable=b89_3var, onvalue=1, offvalue=0)
b89_4 = ttk.Checkbutton(content, text="16", variable=b89_4var, onvalue=1, offvalue=0)
b89_5 = ttk.Checkbutton(content, text="32", variable=b89_5var, onvalue=1, offvalue=0)
b89_7 = ttk.Checkbutton(content, text="HALT", variable=b89_7var, onvalue=1, offvalue=0)

b90_0 = ttk.Checkbutton(content, text="1", variable=b90_0var, onvalue=1, offvalue=0)
b90_1 = ttk.Checkbutton(content, text="2", variable=b90_1var, onvalue=1, offvalue=0)
b90_2 = ttk.Checkbutton(content, text="4", variable=b90_2var, onvalue=1, offvalue=0)
b90_3 = ttk.Checkbutton(content, text="8", variable=b90_3var, onvalue=1, offvalue=0)
b90_4 = ttk.Checkbutton(content, text="16", variable=b90_4var, onvalue=1, offvalue=0)
b90_5 = ttk.Checkbutton(content, text="32", variable=b90_5var, onvalue=1, offvalue=0)
b90_7 = ttk.Checkbutton(content, text="HALT", variable=b90_7var, onvalue=1, offvalue=0)

b91_0 = ttk.Checkbutton(content, text="1", variable=b91_0var, onvalue=1, offvalue=0)
b91_1 = ttk.Checkbutton(content, text="2", variable=b91_1var, onvalue=1, offvalue=0)
b91_2 = ttk.Checkbutton(content, text="4", variable=b91_2var, onvalue=1, offvalue=0)
b91_3 = ttk.Checkbutton(content, text="8", variable=b91_3var, onvalue=1, offvalue=0)
b91_4 = ttk.Checkbutton(content, text="16", variable=b91_4var, onvalue=1, offvalue=0)
b91_5 = ttk.Checkbutton(content, text="32", variable=b91_5var, onvalue=1, offvalue=0)
b91_7 = ttk.Checkbutton(content, text="HALT", variable=b91_7var, onvalue=1, offvalue=0)


#content.grid(column=0, row=0)

# Placing text above each byte
nameb88_0.grid(column=28, row=143, columnspan=2)
nameb89_0.grid(column=28, row=149, columnspan=2)
nameb90_0.grid(column=28, row=155, columnspan=2)
nameb91_0.grid(column=28, row=161, columnspan=2)

# Placing buttons on grid
b88_0.grid(column=25,row=144)
b88_1.grid(column=26,row=144)
b88_2.grid(column=27,row=144)
b88_3.grid(column=28,row=144)
b88_4.grid(column=29,row=144)
b88_5.grid(column=30,row=144, ipadx=10)
b88_7.grid(column=32,row=144, ipadx=10)

b89_0.grid(column=25,row=150)
b89_1.grid(column=26,row=150)
b89_2.grid(column=27,row=150)
b89_3.grid(column=28,row=150)
b89_4.grid(column=29,row=150)
b89_5.grid(column=30,row=150, ipadx=10)
b89_7.grid(column=32,row=150, ipadx=10)

b90_0.grid(column=25,row=156)
b90_1.grid(column=26,row=156)
b90_2.grid(column=27,row=156)
b90_3.grid(column=28,row=156)
b90_4.grid(column=29,row=156)
b90_5.grid(column=30,row=156, ipadx=10)
b90_7.grid(column=32,row=156, ipadx=10)

b91_0.grid(column=25,row=162)
b91_1.grid(column=26,row=162)
b91_2.grid(column=27,row=162)
b91_3.grid(column=28,row=162)
b91_4.grid(column=29,row=162)
b91_5.grid(column=30,row=162, ipadx=10)
b91_7.grid(column=32,row=162, ipadx=10)

# Group 24

# defining labels
nameb92_0 = ttk.Label(content, text="Note 93", background=c1.get())
nameb93_0 = ttk.Label(content, text="Note 94", background=c1.get())
nameb94_0 = ttk.Label(content, text="Note 95", background=c1.get())
nameb95_0 = ttk.Label(content, text="Note 96", background=c1.get())


# Defining number type
b92_0var = IntVar()
b92_1var = IntVar()
b92_2var = IntVar()
b92_3var = IntVar()
b92_4var = IntVar()
b92_5var = IntVar()
b92_7var = IntVar()

b93_0var = IntVar()
b93_1var = IntVar()
b93_2var = IntVar()
b93_3var = IntVar()
b93_4var = IntVar()
b93_5var = IntVar()
b93_7var = IntVar()

b94_0var = IntVar()
b94_1var = IntVar()
b94_2var = IntVar()
b94_3var = IntVar()
b94_4var = IntVar()
b94_5var = IntVar()
b94_7var = IntVar()

b95_0var = IntVar()
b95_1var = IntVar()
b95_2var = IntVar()
b95_3var = IntVar()
b95_4var = IntVar()
b95_5var = IntVar()
b95_7var = IntVar()

# Setting default button position
b92_0var.set(0)
b92_1var.set(0)
b92_2var.set(0)
b92_3var.set(0)
b92_4var.set(0)
b92_5var.set(0)
b92_7var.set(0)

b93_0var.set(0)
b93_1var.set(0)
b93_2var.set(0)
b93_3var.set(0)
b93_4var.set(0)
b93_5var.set(0)
b93_7var.set(0)

b94_0var.set(0)
b94_1var.set(0)
b94_2var.set(0)
b94_3var.set(0)
b94_4var.set(0)
b94_5var.set(0)
b94_7var.set(0)

b95_0var.set(0)
b95_1var.set(0)
b95_2var.set(0)
b95_3var.set(0)
b95_4var.set(0)
b95_5var.set(0)
b95_7var.set(0)

# Defining button
b92_0 = ttk.Checkbutton(content, text="1", variable=b92_0var, onvalue=1, offvalue=0)
b92_1 = ttk.Checkbutton(content, text="2", variable=b92_1var, onvalue=1, offvalue=0)
b92_2 = ttk.Checkbutton(content, text="4", variable=b92_2var, onvalue=1, offvalue=0)
b92_3 = ttk.Checkbutton(content, text="8", variable=b92_3var, onvalue=1, offvalue=0)
b92_4 = ttk.Checkbutton(content, text="16", variable=b92_4var, onvalue=1, offvalue=0)
b92_5 = ttk.Checkbutton(content, text="32", variable=b92_5var, onvalue=1, offvalue=0)
b92_7 = ttk.Checkbutton(content, text="HALT", variable=b92_7var, onvalue=1, offvalue=0)

b93_0 = ttk.Checkbutton(content, text="1", variable=b93_0var, onvalue=1, offvalue=0)
b93_1 = ttk.Checkbutton(content, text="2", variable=b93_1var, onvalue=1, offvalue=0)
b93_2 = ttk.Checkbutton(content, text="4", variable=b93_2var, onvalue=1, offvalue=0)
b93_3 = ttk.Checkbutton(content, text="8", variable=b93_3var, onvalue=1, offvalue=0)
b93_4 = ttk.Checkbutton(content, text="16", variable=b93_4var, onvalue=1, offvalue=0)
b93_5 = ttk.Checkbutton(content, text="32", variable=b93_5var, onvalue=1, offvalue=0)
b93_7 = ttk.Checkbutton(content, text="HALT", variable=b93_7var, onvalue=1, offvalue=0)

b94_0 = ttk.Checkbutton(content, text="1", variable=b94_0var, onvalue=1, offvalue=0)
b94_1 = ttk.Checkbutton(content, text="2", variable=b94_1var, onvalue=1, offvalue=0)
b94_2 = ttk.Checkbutton(content, text="4", variable=b94_2var, onvalue=1, offvalue=0)
b94_3 = ttk.Checkbutton(content, text="8", variable=b94_3var, onvalue=1, offvalue=0)
b94_4 = ttk.Checkbutton(content, text="16", variable=b94_4var, onvalue=1, offvalue=0)
b94_5 = ttk.Checkbutton(content, text="32", variable=b94_5var, onvalue=1, offvalue=0)
b94_7 = ttk.Checkbutton(content, text="HALT", variable=b94_7var, onvalue=1, offvalue=0)

b95_0 = ttk.Checkbutton(content, text="1", variable=b95_0var, onvalue=1, offvalue=0)
b95_1 = ttk.Checkbutton(content, text="2", variable=b95_1var, onvalue=1, offvalue=0)
b95_2 = ttk.Checkbutton(content, text="4", variable=b95_2var, onvalue=1, offvalue=0)
b95_3 = ttk.Checkbutton(content, text="8", variable=b95_3var, onvalue=1, offvalue=0)
b95_4 = ttk.Checkbutton(content, text="16", variable=b95_4var, onvalue=1, offvalue=0)
b95_5 = ttk.Checkbutton(content, text="32", variable=b95_5var, onvalue=1, offvalue=0)
b95_7 = ttk.Checkbutton(content, text="HALT", variable=b95_7var, onvalue=1, offvalue=0)


content.grid(column=0, row=0)

# Placing text above each byte
nameb92_0.grid(column=28, row=167, columnspan=2)
nameb93_0.grid(column=28, row=173, columnspan=2)
nameb94_0.grid(column=28, row=179, columnspan=2)
nameb95_0.grid(column=28, row=185, columnspan=2)

# Placing buttons on grid
b92_0.grid(column=25,row=168)
b92_1.grid(column=26,row=168)
b92_2.grid(column=27,row=168)
b92_3.grid(column=28,row=168)
b92_4.grid(column=29,row=168)
b92_5.grid(column=30,row=168, ipadx=10)
b92_7.grid(column=32,row=168, ipadx=10)

b93_0.grid(column=25,row=174)
b93_1.grid(column=26,row=174)
b93_2.grid(column=27,row=174)
b93_3.grid(column=28,row=174)
b93_4.grid(column=29,row=174)
b93_5.grid(column=30,row=174, ipadx=10)
b93_7.grid(column=32,row=174, ipadx=10)

b94_0.grid(column=25,row=180)
b94_1.grid(column=26,row=180)
b94_2.grid(column=27,row=180)
b94_3.grid(column=28,row=180)
b94_4.grid(column=29,row=180)
b94_5.grid(column=30,row=180, ipadx=10)
b94_7.grid(column=32,row=180, ipadx=10)

b95_0.grid(column=25,row=186)
b95_1.grid(column=26,row=186)
b95_2.grid(column=27,row=186)
b95_3.grid(column=28,row=186)
b95_4.grid(column=29,row=186)
b95_5.grid(column=30,row=186, ipadx=10)
b95_7.grid(column=32,row=186, ipadx=10)

# Defining Start/Stop etc. button colours
ttk.Style().configure('red.TButton', background='firebrick')
ttk.Style().configure('green.TButton', background='pale green')
ttk.Style().configure('orange.TButton', background='peru')
ttk.Style().configure('cream1.TButton', background='cornsilk3')
ttk.Style().configure('cream2.TButton', background='cornsilk2')

button_1 = ttk.Button(content, command=start, text="START", style='green.TButton').grid(column=38, row=90, columnspan=1)
button_2 = ttk.Button(content, command=reset, text="RESET", style='orange.TButton').grid(column=38, row=84, columnspan=1)
button_3 = ttk.Button(content, command=stop, text="STOP", style='red.TButton').grid(column=38, row=78, columnspan=1)
button_4 = ttk.Button(content, command=repeatup, text="SHORTER",style='cream1.TButton').grid(column=38, row=30, columnspan=1)
button_5 = ttk.Button(content, command=repeatdn, text="LONGER",style='cream2.TButton').grid(column=38, row=36, columnspan=1)
button_6 = ttk.Button(content, command=loopup, text="MORE",style='cream1.TButton').grid(column=38, row=12, columnspan=1)
button_7 = ttk.Button(content, command=loopdn, text="LESS",style='cream2.TButton').grid(column=38, row=18, columnspan=1)
button_9 = ttk.Button(content, command=trackup, text="FASTER", style='cream1.TButton').grid(column=38, row=48, columnspan=1)
button_10 = ttk.Button(content, command=trackdn, text="SLOWER", style='cream2.TButton').grid(column=38, row=54, columnspan=1)

#defining temp buttons
ff0 = ttk.Button(content, command=f0, text="F", width=1, style='cream1.TButton').grid(column=11, row=3, columnspan=1)
ff1 = ttk.Button(content, command=f1, text="F", width=1, style='cream1.TButton').grid(column=11, row=6, columnspan=1)
ff2 = ttk.Button(content, command=f2, text="F", width=1, style='cream1.TButton').grid(column=11, row=12, columnspan=1)
ff3 = ttk.Button(content, command=f3, text="F", width=1, style='cream1.TButton').grid(column=11, row=18, columnspan=1)
ff4 = ttk.Button(content, command=f4, text="F", width=1, style='cream1.TButton').grid(column=11, row=24, columnspan=1)
ff5 = ttk.Button(content, command=f5, text="F", width=1, style='cream1.TButton').grid(column=11, row=30, columnspan=1)
ff6 = ttk.Button(content, command=f6, text="F", width=1, style='cream1.TButton').grid(column=11, row=36, columnspan=1)
ff7 = ttk.Button(content, command=f7, text="F", width=1, style='cream1.TButton').grid(column=11, row=42, columnspan=1)
ff8 = ttk.Button(content, command=f8, text="F", width=1, style='cream1.TButton').grid(column=11, row=48, columnspan=1)
ff9 = ttk.Button(content, command=f9, text="F", width=1, style='cream1.TButton').grid(column=11, row=54, columnspan=1)
ff10 = ttk.Button(content, command=f10, text="F", width=1, style='cream1.TButton').grid(column=11, row=60, columnspan=1)
ff11 = ttk.Button(content, command=f11, text="F", width=1, style='cream1.TButton').grid(column=11, row=66, columnspan=1)
ff12 = ttk.Button(content, command=f12, text="F", width=1, style='cream1.TButton').grid(column=11, row=72, columnspan=1)
ff13 = ttk.Button(content, command=f13, text="F", width=1, style='cream1.TButton').grid(column=11, row=78, columnspan=1)
ff14 = ttk.Button(content, command=f14, text="F", width=1, style='cream1.TButton').grid(column=11, row=84, columnspan=1)
ff15 = ttk.Button(content, command=f15, text="F", width=1, style='cream1.TButton').grid(column=11, row=90, columnspan=1)
ff16 = ttk.Button(content, command=f16, text="F", width=1, style='cream1.TButton').grid(column=23, row=3, columnspan=1)
ff17 = ttk.Button(content, command=f17, text="F", width=1, style='cream1.TButton').grid(column=23, row=6, columnspan=1)
ff18 = ttk.Button(content, command=f18, text="F", width=1, style='cream1.TButton').grid(column=23, row=12, columnspan=1)
ff19 = ttk.Button(content, command=f19, text="F", width=1, style='cream1.TButton').grid(column=23, row=18, columnspan=1)
ff20 = ttk.Button(content, command=f20, text="F", width=1, style='cream1.TButton').grid(column=23, row=24, columnspan=1)
ff21 = ttk.Button(content, command=f21, text="F", width=1, style='cream1.TButton').grid(column=23, row=30, columnspan=1)
ff22 = ttk.Button(content, command=f22, text="F", width=1, style='cream1.TButton').grid(column=23, row=36, columnspan=1)
ff23 = ttk.Button(content, command=f23, text="F", width=1, style='cream1.TButton').grid(column=23, row=42, columnspan=1)
ff24 = ttk.Button(content, command=f24, text="F", width=1, style='cream1.TButton').grid(column=23, row=48, columnspan=1)
ff25 = ttk.Button(content, command=f25, text="F", width=1, style='cream1.TButton').grid(column=23, row=54, columnspan=1)
ff26 = ttk.Button(content, command=f26, text="F", width=1, style='cream1.TButton').grid(column=23, row=60, columnspan=1)
ff27 = ttk.Button(content, command=f27, text="F", width=1, style='cream1.TButton').grid(column=23, row=66, columnspan=1)
ff28 = ttk.Button(content, command=f28, text="F", width=1, style='cream1.TButton').grid(column=23, row=72, columnspan=1)
ff29 = ttk.Button(content, command=f29, text="F", width=1, style='cream1.TButton').grid(column=23, row=78, columnspan=1)
ff30 = ttk.Button(content, command=f30, text="F", width=1, style='cream1.TButton').grid(column=23, row=84, columnspan=1)
ff31 = ttk.Button(content, command=f31, text="F", width=1, style='cream1.TButton').grid(column=23, row=90, columnspan=1)
ff32 = ttk.Button(content, command=f32, text="F", width=1, style='cream1.TButton').grid(column=35, row=3, columnspan=1)
ff33 = ttk.Button(content, command=f33, text="F", width=1, style='cream1.TButton').grid(column=35, row=6, columnspan=1)
ff34 = ttk.Button(content, command=f34, text="F", width=1, style='cream1.TButton').grid(column=35, row=12, columnspan=1)
ff35 = ttk.Button(content, command=f35, text="F", width=1, style='cream1.TButton').grid(column=35, row=18, columnspan=1)
ff36 = ttk.Button(content, command=f36, text="F", width=1, style='cream1.TButton').grid(column=35, row=24, columnspan=1)
ff37 = ttk.Button(content, command=f37, text="F", width=1, style='cream1.TButton').grid(column=35, row=30, columnspan=1)
ff38 = ttk.Button(content, command=f38, text="F", width=1, style='cream1.TButton').grid(column=35, row=36, columnspan=1)
ff39 = ttk.Button(content, command=f39, text="F", width=1, style='cream1.TButton').grid(column=35, row=42, columnspan=1)
ff40 = ttk.Button(content, command=f40, text="F", width=1, style='cream1.TButton').grid(column=35, row=48, columnspan=1)
ff41 = ttk.Button(content, command=f41, text="F", width=1, style='cream1.TButton').grid(column=35, row=54, columnspan=1)
ff42 = ttk.Button(content, command=f42, text="F", width=1, style='cream1.TButton').grid(column=35, row=60, columnspan=1)
ff43 = ttk.Button(content, command=f43, text="F", width=1, style='cream1.TButton').grid(column=35, row=66, columnspan=1)
ff44 = ttk.Button(content, command=f44, text="F", width=1, style='cream1.TButton').grid(column=35, row=72, columnspan=1)
ff45 = ttk.Button(content, command=f45, text="F", width=1, style='cream1.TButton').grid(column=35, row=78, columnspan=1)
ff46 = ttk.Button(content, command=f46, text="F", width=1, style='cream1.TButton').grid(column=35, row=84, columnspan=1)
ff47 = ttk.Button(content, command=f47, text="F", width=1, style='cream1.TButton').grid(column=35, row=90, columnspan=1)
ff48 = ttk.Button(content, command=f48, text="F", width=1, style='cream1.TButton').grid(column=11, row=96, columnspan=1)
ff49 = ttk.Button(content, command=f49, text="F", width=1, style='cream1.TButton').grid(column=11, row=102, columnspan=1)
ff50 = ttk.Button(content, command=f50, text="F", width=1, style='cream1.TButton').grid(column=11, row=108, columnspan=1)
ff51 = ttk.Button(content, command=f51, text="F", width=1, style='cream1.TButton').grid(column=11, row=114, columnspan=1)
ff52 = ttk.Button(content, command=f52, text="F", width=1, style='cream1.TButton').grid(column=11, row=120, columnspan=1)
ff53 = ttk.Button(content, command=f53, text="F", width=1, style='cream1.TButton').grid(column=11, row=126, columnspan=1)
ff54 = ttk.Button(content, command=f54, text="F", width=1, style='cream1.TButton').grid(column=11, row=132, columnspan=1)
ff55 = ttk.Button(content, command=f55, text="F", width=1, style='cream1.TButton').grid(column=11, row=138, columnspan=1)
ff56 = ttk.Button(content, command=f56, text="F", width=1, style='cream1.TButton').grid(column=11, row=144, columnspan=1)
ff57 = ttk.Button(content, command=f57, text="F", width=1, style='cream1.TButton').grid(column=11, row=150, columnspan=1)
ff58 = ttk.Button(content, command=f58, text="F", width=1, style='cream1.TButton').grid(column=11, row=156, columnspan=1)
ff59 = ttk.Button(content, command=f59, text="F", width=1, style='cream1.TButton').grid(column=11, row=162, columnspan=1)
ff60 = ttk.Button(content, command=f60, text="F", width=1, style='cream1.TButton').grid(column=11, row=168, columnspan=1)
ff61 = ttk.Button(content, command=f61, text="F", width=1, style='cream1.TButton').grid(column=11, row=174, columnspan=1)
ff62 = ttk.Button(content, command=f62, text="F", width=1, style='cream1.TButton').grid(column=11, row=180, columnspan=1)
ff63 = ttk.Button(content, command=f63, text="F", width=1, style='cream1.TButton').grid(column=11, row=186, columnspan=1)
ff64 = ttk.Button(content, command=f64, text="F", width=1, style='cream1.TButton').grid(column=23, row=96, columnspan=1)
ff65 = ttk.Button(content, command=f65, text="F", width=1, style='cream1.TButton').grid(column=23, row=102, columnspan=1)
ff66 = ttk.Button(content, command=f66, text="F", width=1, style='cream1.TButton').grid(column=23, row=108, columnspan=1)
ff67 = ttk.Button(content, command=f67, text="F", width=1, style='cream1.TButton').grid(column=23, row=114, columnspan=1)
ff68 = ttk.Button(content, command=f68, text="F", width=1, style='cream1.TButton').grid(column=23, row=120, columnspan=1)
ff69 = ttk.Button(content, command=f69, text="F", width=1, style='cream1.TButton').grid(column=23, row=126, columnspan=1)
ff70 = ttk.Button(content, command=f70, text="F", width=1, style='cream1.TButton').grid(column=23, row=132, columnspan=1)
ff71 = ttk.Button(content, command=f71, text="F", width=1, style='cream1.TButton').grid(column=23, row=138, columnspan=1)
ff72 = ttk.Button(content, command=f72, text="F", width=1, style='cream1.TButton').grid(column=23, row=144, columnspan=1)
ff73 = ttk.Button(content, command=f73, text="F", width=1, style='cream1.TButton').grid(column=23, row=150, columnspan=1)
ff74 = ttk.Button(content, command=f74, text="F", width=1, style='cream1.TButton').grid(column=23, row=156, columnspan=1)
ff75 = ttk.Button(content, command=f75, text="F", width=1, style='cream1.TButton').grid(column=23, row=162, columnspan=1)
ff76 = ttk.Button(content, command=f76, text="F", width=1, style='cream1.TButton').grid(column=23, row=168, columnspan=1)
ff77 = ttk.Button(content, command=f77, text="F", width=1, style='cream1.TButton').grid(column=23, row=174, columnspan=1)
ff78 = ttk.Button(content, command=f78, text="F", width=1, style='cream1.TButton').grid(column=23, row=180, columnspan=1)
ff79 = ttk.Button(content, command=f79, text="F", width=1, style='cream1.TButton').grid(column=23, row=186, columnspan=1)
ff80 = ttk.Button(content, command=f80, text="F", width=1, style='cream1.TButton').grid(column=35, row=96, columnspan=1)
ff81 = ttk.Button(content, command=f81, text="F", width=1, style='cream1.TButton').grid(column=35, row=102, columnspan=1)
ff82 = ttk.Button(content, command=f82, text="F", width=1, style='cream1.TButton').grid(column=35, row=108, columnspan=1)
ff83 = ttk.Button(content, command=f83, text="F", width=1, style='cream1.TButton').grid(column=35, row=114, columnspan=1)
ff84 = ttk.Button(content, command=f84, text="F", width=1, style='cream1.TButton').grid(column=35, row=120, columnspan=1)
ff85 = ttk.Button(content, command=f85, text="F", width=1, style='cream1.TButton').grid(column=35, row=126, columnspan=1)
ff86 = ttk.Button(content, command=f86, text="F", width=1, style='cream1.TButton').grid(column=35, row=132, columnspan=1)
ff87 = ttk.Button(content, command=f87, text="F", width=1, style='cream1.TButton').grid(column=35, row=138, columnspan=1)
ff88 = ttk.Button(content, command=f88, text="F", width=1, style='cream1.TButton').grid(column=35, row=144, columnspan=1)
ff89 = ttk.Button(content, command=f89, text="F", width=1, style='cream1.TButton').grid(column=35, row=150, columnspan=1)
ff90 = ttk.Button(content, command=f90, text="F", width=1, style='cream1.TButton').grid(column=35, row=156, columnspan=1)
ff91 = ttk.Button(content, command=f91, text="F", width=1, style='cream1.TButton').grid(column=35, row=162, columnspan=1)
ff92 = ttk.Button(content, command=f92, text="F", width=1, style='cream1.TButton').grid(column=35, row=168, columnspan=1)
ff93 = ttk.Button(content, command=f93, text="F", width=1, style='cream1.TButton').grid(column=35, row=174, columnspan=1)
ff94 = ttk.Button(content, command=f94, text="F", width=1, style='cream1.TButton').grid(column=35, row=180, columnspan=1)
ff95 = ttk.Button(content, command=f95, text="F", width=1, style='cream1.TButton').grid(column=35, row=186, columnspan=1)


ss0 = ttk.Button(content, command=s0, text="S", width=1, style='cream2.TButton').grid(column=9, row=3, columnspan=1)
ss1 = ttk.Button(content, command=s1, text="S", width=1, style='cream2.TButton').grid(column=9, row=6, columnspan=1)
ss2 = ttk.Button(content, command=s2, text="S", width=1, style='cream2.TButton').grid(column=9, row=12, columnspan=1)
ss3 = ttk.Button(content, command=s3, text="S", width=1, style='cream2.TButton').grid(column=9, row=18, columnspan=1)
ss4 = ttk.Button(content, command=s4, text="S", width=1, style='cream2.TButton').grid(column=9, row=24, columnspan=1)
ss5 = ttk.Button(content, command=s5, text="S", width=1, style='cream2.TButton').grid(column=9, row=30, columnspan=1)
ss6 = ttk.Button(content, command=s6, text="S", width=1, style='cream2.TButton').grid(column=9, row=36, columnspan=1)
ss7 = ttk.Button(content, command=s7, text="S", width=1, style='cream2.TButton').grid(column=9, row=42, columnspan=1)
ss8 = ttk.Button(content, command=s8, text="S", width=1, style='cream2.TButton').grid(column=9, row=48, columnspan=1)
ss9 = ttk.Button(content, command=s9, text="S", width=1, style='cream2.TButton').grid(column=9, row=54, columnspan=1)
ss10 = ttk.Button(content, command=s10, text="S", width=1, style='cream2.TButton').grid(column=9, row=60, columnspan=1)
ss11 = ttk.Button(content, command=s11, text="S", width=1, style='cream2.TButton').grid(column=9, row=66, columnspan=1)
ss12 = ttk.Button(content, command=s12, text="S", width=1, style='cream2.TButton').grid(column=9, row=72, columnspan=1)
ss13 = ttk.Button(content, command=s13, text="S", width=1, style='cream2.TButton').grid(column=9, row=78, columnspan=1)
ss14 = ttk.Button(content, command=s14, text="S", width=1, style='cream2.TButton').grid(column=9, row=84, columnspan=1)
ss15 = ttk.Button(content, command=s15, text="S", width=1, style='cream2.TButton').grid(column=9, row=90, columnspan=1)
ss16 = ttk.Button(content, command=s16, text="S", width=1, style='cream2.TButton').grid(column=21, row=3, columnspan=1)
ss17 = ttk.Button(content, command=s17, text="S", width=1, style='cream2.TButton').grid(column=21, row=6, columnspan=1)
ss18 = ttk.Button(content, command=s18, text="S", width=1, style='cream2.TButton').grid(column=21, row=12, columnspan=1)
ss19 = ttk.Button(content, command=s19, text="S", width=1, style='cream2.TButton').grid(column=21, row=18, columnspan=1)
ss20 = ttk.Button(content, command=s20, text="S", width=1, style='cream2.TButton').grid(column=21, row=24, columnspan=1)
ss21 = ttk.Button(content, command=s21, text="S", width=1, style='cream2.TButton').grid(column=21, row=30, columnspan=1)
ss22 = ttk.Button(content, command=s22, text="S", width=1, style='cream2.TButton').grid(column=21, row=36, columnspan=1)
ss23 = ttk.Button(content, command=s23, text="S", width=1, style='cream2.TButton').grid(column=21, row=42, columnspan=1)
ss24 = ttk.Button(content, command=s24, text="S", width=1, style='cream2.TButton').grid(column=21, row=48, columnspan=1)
ss25 = ttk.Button(content, command=s25, text="S", width=1, style='cream2.TButton').grid(column=21, row=54, columnspan=1)
ss26 = ttk.Button(content, command=s26, text="S", width=1, style='cream2.TButton').grid(column=21, row=60, columnspan=1)
ss27 = ttk.Button(content, command=s27, text="S", width=1, style='cream2.TButton').grid(column=21, row=66, columnspan=1)
ss28 = ttk.Button(content, command=s28, text="S", width=1, style='cream2.TButton').grid(column=21, row=72, columnspan=1)
ss29 = ttk.Button(content, command=s29, text="S", width=1, style='cream2.TButton').grid(column=21, row=78, columnspan=1)
ss30 = ttk.Button(content, command=s30, text="S", width=1, style='cream2.TButton').grid(column=21, row=84, columnspan=1)
ss31 = ttk.Button(content, command=s31, text="S", width=1, style='cream2.TButton').grid(column=21, row=90, columnspan=1)
ss32 = ttk.Button(content, command=s32, text="S", width=1, style='cream2.TButton').grid(column=33, row=3, columnspan=1)
ss33 = ttk.Button(content, command=s33, text="S", width=1, style='cream2.TButton').grid(column=33, row=6, columnspan=1)
ss34 = ttk.Button(content, command=s34, text="S", width=1, style='cream2.TButton').grid(column=33, row=12, columnspan=1)
ss35 = ttk.Button(content, command=s35, text="S", width=1, style='cream2.TButton').grid(column=33, row=18, columnspan=1)
ss36 = ttk.Button(content, command=s36, text="S", width=1, style='cream2.TButton').grid(column=33, row=24, columnspan=1)
ss37 = ttk.Button(content, command=s37, text="S", width=1, style='cream2.TButton').grid(column=33, row=30, columnspan=1)
ss38 = ttk.Button(content, command=s38, text="S", width=1, style='cream2.TButton').grid(column=33, row=36, columnspan=1)
ss39 = ttk.Button(content, command=s39, text="S", width=1, style='cream2.TButton').grid(column=33, row=42, columnspan=1)
ss40 = ttk.Button(content, command=s40, text="S", width=1, style='cream2.TButton').grid(column=33, row=48, columnspan=1)
ss41 = ttk.Button(content, command=s41, text="S", width=1, style='cream2.TButton').grid(column=33, row=54, columnspan=1)
ss42 = ttk.Button(content, command=s42, text="S", width=1, style='cream2.TButton').grid(column=33, row=60, columnspan=1)
ss43 = ttk.Button(content, command=s43, text="S", width=1, style='cream2.TButton').grid(column=33, row=66, columnspan=1)
ss44 = ttk.Button(content, command=s44, text="S", width=1, style='cream2.TButton').grid(column=33, row=72, columnspan=1)
ss45 = ttk.Button(content, command=s45, text="S", width=1, style='cream2.TButton').grid(column=33, row=78, columnspan=1)
ss46 = ttk.Button(content, command=s46, text="S", width=1, style='cream2.TButton').grid(column=33, row=84, columnspan=1)
ss47 = ttk.Button(content, command=s47, text="S", width=1, style='cream2.TButton').grid(column=33, row=90, columnspan=1)
ss48 = ttk.Button(content, command=s48, text="S", width=1, style='cream2.TButton').grid(column=9, row=96, columnspan=1)
ss49 = ttk.Button(content, command=s49, text="S", width=1, style='cream2.TButton').grid(column=9, row=102, columnspan=1)
ss50 = ttk.Button(content, command=s50, text="S", width=1, style='cream2.TButton').grid(column=9, row=108, columnspan=1)
ss51 = ttk.Button(content, command=s51, text="S", width=1, style='cream2.TButton').grid(column=9, row=114, columnspan=1)
ss52 = ttk.Button(content, command=s52, text="S", width=1, style='cream2.TButton').grid(column=9, row=120, columnspan=1)
ss53 = ttk.Button(content, command=s53, text="S", width=1, style='cream2.TButton').grid(column=9, row=126, columnspan=1)
ss54 = ttk.Button(content, command=s54, text="S", width=1, style='cream2.TButton').grid(column=9, row=132, columnspan=1)
ss55 = ttk.Button(content, command=s55, text="S", width=1, style='cream2.TButton').grid(column=9, row=138, columnspan=1)
ss56 = ttk.Button(content, command=s56, text="S", width=1, style='cream2.TButton').grid(column=9, row=144, columnspan=1)
ss57 = ttk.Button(content, command=s57, text="S", width=1, style='cream2.TButton').grid(column=9, row=150, columnspan=1)
ss58 = ttk.Button(content, command=s58, text="S", width=1, style='cream2.TButton').grid(column=9, row=156, columnspan=1)
ss59 = ttk.Button(content, command=s59, text="S", width=1, style='cream2.TButton').grid(column=9, row=162, columnspan=1)
ss60 = ttk.Button(content, command=s60, text="S", width=1, style='cream2.TButton').grid(column=9, row=168, columnspan=1)
ss61 = ttk.Button(content, command=s61, text="S", width=1, style='cream2.TButton').grid(column=9, row=174, columnspan=1)
ss62 = ttk.Button(content, command=s62, text="S", width=1, style='cream2.TButton').grid(column=9, row=180, columnspan=1)
ss63 = ttk.Button(content, command=s63, text="S", width=1, style='cream2.TButton').grid(column=9, row=186, columnspan=1)
ss64 = ttk.Button(content, command=s64, text="S", width=1, style='cream2.TButton').grid(column=21, row=96, columnspan=1)
ss65 = ttk.Button(content, command=s65, text="S", width=1, style='cream2.TButton').grid(column=21, row=102, columnspan=1)
ss66 = ttk.Button(content, command=s66, text="S", width=1, style='cream2.TButton').grid(column=21, row=108, columnspan=1)
ss67 = ttk.Button(content, command=s67, text="S", width=1, style='cream2.TButton').grid(column=21, row=114, columnspan=1)
ss68 = ttk.Button(content, command=s68, text="S", width=1, style='cream2.TButton').grid(column=21, row=120, columnspan=1)
ss69 = ttk.Button(content, command=s69, text="S", width=1, style='cream2.TButton').grid(column=21, row=126, columnspan=1)
ss70 = ttk.Button(content, command=s70, text="S", width=1, style='cream2.TButton').grid(column=21, row=132, columnspan=1)
ss71 = ttk.Button(content, command=s71, text="S", width=1, style='cream2.TButton').grid(column=21, row=138, columnspan=1)
ss72 = ttk.Button(content, command=s72, text="S", width=1, style='cream2.TButton').grid(column=21, row=144, columnspan=1)
ss73 = ttk.Button(content, command=s73, text="S", width=1, style='cream2.TButton').grid(column=21, row=150, columnspan=1)
ss74 = ttk.Button(content, command=s74, text="S", width=1, style='cream2.TButton').grid(column=21, row=156, columnspan=1)
ss75 = ttk.Button(content, command=s75, text="S", width=1, style='cream2.TButton').grid(column=21, row=162, columnspan=1)
ss76 = ttk.Button(content, command=s76, text="S", width=1, style='cream2.TButton').grid(column=21, row=168, columnspan=1)
ss77 = ttk.Button(content, command=s77, text="S", width=1, style='cream2.TButton').grid(column=21, row=174, columnspan=1)
ss78 = ttk.Button(content, command=s78, text="S", width=1, style='cream2.TButton').grid(column=21, row=180, columnspan=1)
ss79 = ttk.Button(content, command=s79, text="S", width=1, style='cream2.TButton').grid(column=21, row=186, columnspan=1)
ss80 = ttk.Button(content, command=s80, text="S", width=1, style='cream2.TButton').grid(column=33, row=96, columnspan=1)
ss81 = ttk.Button(content, command=s81, text="S", width=1, style='cream2.TButton').grid(column=33, row=102, columnspan=1)
ss82 = ttk.Button(content, command=s82, text="S", width=1, style='cream2.TButton').grid(column=33, row=108, columnspan=1)
ss83 = ttk.Button(content, command=s83, text="S", width=1, style='cream2.TButton').grid(column=33, row=114, columnspan=1)
ss84 = ttk.Button(content, command=s84, text="S", width=1, style='cream2.TButton').grid(column=33, row=120, columnspan=1)
ss85 = ttk.Button(content, command=s85, text="S", width=1, style='cream2.TButton').grid(column=33, row=126, columnspan=1)
ss86 = ttk.Button(content, command=s86, text="S", width=1, style='cream2.TButton').grid(column=33, row=132, columnspan=1)
ss87 = ttk.Button(content, command=s87, text="S", width=1, style='cream2.TButton').grid(column=33, row=138, columnspan=1)
ss88 = ttk.Button(content, command=s88, text="S", width=1, style='cream2.TButton').grid(column=33, row=144, columnspan=1)
ss89 = ttk.Button(content, command=s89, text="S", width=1, style='cream2.TButton').grid(column=33, row=150, columnspan=1)
ss90 = ttk.Button(content, command=s90, text="S", width=1, style='cream2.TButton').grid(column=33, row=156, columnspan=1)
ss91 = ttk.Button(content, command=s91, text="S", width=1, style='cream2.TButton').grid(column=33, row=162, columnspan=1)
ss92 = ttk.Button(content, command=s92, text="S", width=1, style='cream2.TButton').grid(column=33, row=168, columnspan=1)
ss93 = ttk.Button(content, command=s93, text="S", width=1, style='cream2.TButton').grid(column=33, row=174, columnspan=1)
ss94 = ttk.Button(content, command=s94, text="S", width=1, style='cream2.TButton').grid(column=33, row=180, columnspan=1)
ss95 = ttk.Button(content, command=s95, text="S", width=1, style='cream2.TButton').grid(column=33, row=186, columnspan=1)


showspeed0 = ttk.Label(content, width=5, text=show_speed0.get())
showspeed0.grid(column=10, row=3, columnspan=1)
showspeed1 = ttk.Label(content, width=5, text=show_speed1.get())
showspeed1.grid(column=10, row=6, columnspan=1)
showspeed2 = ttk.Label(content, width=5, text=show_speed2.get())
showspeed2.grid(column=10, row=12, columnspan=1)
showspeed3 = ttk.Label(content, width=5, text=show_speed3.get())
showspeed3.grid(column=10, row=18, columnspan=1)
showspeed4 = ttk.Label(content, width=5, text=show_speed4.get())
showspeed4.grid(column=10, row=24, columnspan=1)
showspeed5 = ttk.Label(content, width=5, text=show_speed5.get())
showspeed5.grid(column=10, row=30, columnspan=1)
showspeed6 = ttk.Label(content, width=5, text=show_speed6.get())
showspeed6.grid(column=10, row=36, columnspan=1)
showspeed7 = ttk.Label(content, width=5, text=show_speed7.get())
showspeed7.grid(column=10, row=42, columnspan=1)
showspeed8 = ttk.Label(content, width=5, text=show_speed8.get())
showspeed8.grid(column=10, row=48, columnspan=1)
showspeed9 = ttk.Label(content, width=5, text=show_speed9.get())
showspeed9.grid(column=10, row=54, columnspan=1)
showspeed10 = ttk.Label(content, width=5, text=show_speed10.get())
showspeed10.grid(column=10, row=60, columnspan=1)
showspeed11 = ttk.Label(content, width=5, text=show_speed11.get())
showspeed11.grid(column=10, row=66, columnspan=1)
showspeed12 = ttk.Label(content, width=5, text=show_speed12.get())
showspeed12.grid(column=10, row=72, columnspan=1)
showspeed13 = ttk.Label(content, width=5, text=show_speed13.get())
showspeed13.grid(column=10, row=78, columnspan=1)
showspeed14 = ttk.Label(content, width=5, text=show_speed14.get())
showspeed14.grid(column=10, row=84, columnspan=1)
showspeed15 = ttk.Label(content, width=5, text=show_speed15.get())
showspeed15.grid(column=10, row=90, columnspan=1)
showspeed16 = ttk.Label(content, width=5, text=show_speed16.get())
showspeed16.grid(column=22, row=3, columnspan=1)
showspeed17 = ttk.Label(content, width=5, text=show_speed17.get())
showspeed17.grid(column=22, row=6, columnspan=1)
showspeed18 = ttk.Label(content, width=5, text=show_speed18.get())
showspeed18.grid(column=22, row=12, columnspan=1)
showspeed19 = ttk.Label(content, width=5, text=show_speed19.get())
showspeed19.grid(column=22, row=18, columnspan=1)
showspeed20 = ttk.Label(content, width=5, text=show_speed20.get())
showspeed20.grid(column=22, row=24, columnspan=1)
showspeed21 = ttk.Label(content, width=5, text=show_speed21.get())
showspeed21.grid(column=22, row=30, columnspan=1)
showspeed22 = ttk.Label(content, width=5, text=show_speed22.get())
showspeed22.grid(column=22, row=36, columnspan=1)
showspeed23 = ttk.Label(content, width=5, text=show_speed23.get())
showspeed23.grid(column=22, row=42, columnspan=1)
showspeed24 = ttk.Label(content, width=5, text=show_speed24.get())
showspeed24.grid(column=22, row=48, columnspan=1)
showspeed25 = ttk.Label(content, width=5, text=show_speed25.get())
showspeed25.grid(column=22, row=54, columnspan=1)
showspeed26 = ttk.Label(content, width=5, text=show_speed26.get())
showspeed26.grid(column=22, row=60, columnspan=1)
showspeed27 = ttk.Label(content, width=5, text=show_speed27.get())
showspeed27.grid(column=22, row=66, columnspan=1)
showspeed28 = ttk.Label(content, width=5, text=show_speed28.get())
showspeed28.grid(column=22, row=72, columnspan=1)
showspeed29 = ttk.Label(content, width=5, text=show_speed29.get())
showspeed29.grid(column=22, row=78, columnspan=1)
showspeed30 = ttk.Label(content, width=5, text=show_speed30.get())
showspeed30.grid(column=22, row=84, columnspan=1)
showspeed31 = ttk.Label(content, width=5, text=show_speed31.get())
showspeed31.grid(column=22, row=90, columnspan=1)
showspeed32 = ttk.Label(content, width=5, text=show_speed32.get())
showspeed32.grid(column=34, row=3, columnspan=1)
showspeed33 = ttk.Label(content, width=5, text=show_speed33.get())
showspeed33.grid(column=34, row=6, columnspan=1)
showspeed34 = ttk.Label(content, width=5, text=show_speed34.get())
showspeed34.grid(column=34, row=12, columnspan=1)
showspeed35 = ttk.Label(content, width=5, text=show_speed35.get())
showspeed35.grid(column=34, row=18, columnspan=1)
showspeed36 = ttk.Label(content, width=5, text=show_speed36.get())
showspeed36.grid(column=34, row=24, columnspan=1)
showspeed37 = ttk.Label(content, width=5, text=show_speed37.get())
showspeed37.grid(column=34, row=30, columnspan=1)
showspeed38 = ttk.Label(content, width=5, text=show_speed38.get())
showspeed38.grid(column=34, row=36, columnspan=1)
showspeed39 = ttk.Label(content, width=5, text=show_speed39.get())
showspeed39.grid(column=34, row=42, columnspan=1)
showspeed40 = ttk.Label(content, width=5, text=show_speed40.get())
showspeed40.grid(column=34, row=48, columnspan=1)
showspeed41 = ttk.Label(content, width=5, text=show_speed41.get())
showspeed41.grid(column=34, row=54, columnspan=1)
showspeed42 = ttk.Label(content, width=5, text=show_speed42.get())
showspeed42.grid(column=34, row=60, columnspan=1)
showspeed43 = ttk.Label(content, width=5, text=show_speed43.get())
showspeed43.grid(column=34, row=66, columnspan=1)
showspeed44 = ttk.Label(content, width=5, text=show_speed44.get())
showspeed44.grid(column=34, row=72, columnspan=1)
showspeed45 = ttk.Label(content, width=5, text=show_speed45.get())
showspeed45.grid(column=34, row=78, columnspan=1)
showspeed46 = ttk.Label(content, width=5, text=show_speed46.get())
showspeed46.grid(column=34, row=84, columnspan=1)
showspeed47 = ttk.Label(content, width=5, text=show_speed47.get())
showspeed47.grid(column=34, row=90, columnspan=1)
showspeed48 = ttk.Label(content, width=5, text=show_speed48.get())
showspeed48.grid(column=10, row=96, columnspan=1)
showspeed49 = ttk.Label(content, width=5, text=show_speed49.get())
showspeed49.grid(column=10, row=102, columnspan=1)
showspeed50 = ttk.Label(content, width=5, text=show_speed50.get())
showspeed50.grid(column=10, row=108, columnspan=1)
showspeed51 = ttk.Label(content, width=5, text=show_speed51.get())
showspeed51.grid(column=10, row=114, columnspan=1)
showspeed52 = ttk.Label(content, width=5, text=show_speed52.get())
showspeed52.grid(column=10, row=120, columnspan=1)
showspeed53 = ttk.Label(content, width=5, text=show_speed53.get())
showspeed53.grid(column=10, row=126, columnspan=1)
showspeed54 = ttk.Label(content, width=5, text=show_speed54.get())
showspeed54.grid(column=10, row=132, columnspan=1)
showspeed55 = ttk.Label(content, width=5, text=show_speed55.get())
showspeed55.grid(column=10, row=138, columnspan=1)
showspeed56 = ttk.Label(content, width=5, text=show_speed56.get())
showspeed56.grid(column=10, row=144, columnspan=1)
showspeed57 = ttk.Label(content, width=5, text=show_speed57.get())
showspeed57.grid(column=10, row=150, columnspan=1)
showspeed58 = ttk.Label(content, width=5, text=show_speed58.get())
showspeed58.grid(column=10, row=156, columnspan=1)
showspeed59 = ttk.Label(content, width=5, text=show_speed59.get())
showspeed59.grid(column=10, row=162, columnspan=1)
showspeed60 = ttk.Label(content, width=5, text=show_speed60.get())
showspeed60.grid(column=10, row=168, columnspan=1)
showspeed61 = ttk.Label(content, width=5, text=show_speed61.get())
showspeed61.grid(column=10, row=174, columnspan=1)
showspeed62 = ttk.Label(content, width=5, text=show_speed62.get())
showspeed62.grid(column=10, row=180, columnspan=1)
showspeed63 = ttk.Label(content, width=5, text=show_speed63.get())
showspeed63.grid(column=10, row=186, columnspan=1)
showspeed64 = ttk.Label(content, width=5, text=show_speed64.get())
showspeed64.grid(column=22, row=96, columnspan=1)
showspeed65 = ttk.Label(content, width=5, text=show_speed65.get())
showspeed65.grid(column=22, row=102, columnspan=1)
showspeed66 = ttk.Label(content, width=5, text=show_speed66.get())
showspeed66.grid(column=22, row=108, columnspan=1)
showspeed67 = ttk.Label(content, width=5, text=show_speed67.get())
showspeed67.grid(column=22, row=114, columnspan=1)
showspeed68 = ttk.Label(content, width=5, text=show_speed68.get())
showspeed68.grid(column=22, row=120, columnspan=1)
showspeed69 = ttk.Label(content, width=5, text=show_speed69.get())
showspeed69.grid(column=22, row=126, columnspan=1)
showspeed70 = ttk.Label(content, width=5, text=show_speed70.get())
showspeed70.grid(column=22, row=132, columnspan=1)
showspeed71 = ttk.Label(content, width=5, text=show_speed71.get())
showspeed71.grid(column=22, row=138, columnspan=1)
showspeed72 = ttk.Label(content, width=5, text=show_speed72.get())
showspeed72.grid(column=22, row=144, columnspan=1)
showspeed73 = ttk.Label(content, width=5, text=show_speed73.get())
showspeed73.grid(column=22, row=150, columnspan=1)
showspeed74 = ttk.Label(content, width=5, text=show_speed74.get())
showspeed74.grid(column=22, row=156, columnspan=1)
showspeed75 = ttk.Label(content, width=5, text=show_speed75.get())
showspeed75.grid(column=22, row=162, columnspan=1)
showspeed76 = ttk.Label(content, width=5, text=show_speed76.get())
showspeed76.grid(column=22, row=168, columnspan=1)
showspeed77 = ttk.Label(content, width=5, text=show_speed77.get())
showspeed77.grid(column=22, row=174, columnspan=1)
showspeed78 = ttk.Label(content, width=5, text=show_speed78.get())
showspeed78.grid(column=22, row=180, columnspan=1)
showspeed79 = ttk.Label(content, width=5, text=show_speed79.get())
showspeed79.grid(column=22, row=186, columnspan=1)
showspeed80 = ttk.Label(content, width=5, text=show_speed80.get())
showspeed80.grid(column=34, row=96, columnspan=1)
showspeed81 = ttk.Label(content, width=5, text=show_speed81.get())
showspeed81.grid(column=34, row=102, columnspan=1)
showspeed82 = ttk.Label(content, width=5, text=show_speed82.get())
showspeed82.grid(column=34, row=108, columnspan=1)
showspeed83 = ttk.Label(content, width=5, text=show_speed83.get())
showspeed83.grid(column=34, row=114, columnspan=1)
showspeed84 = ttk.Label(content, width=5, text=show_speed84.get())
showspeed84.grid(column=34, row=120, columnspan=1)
showspeed85 = ttk.Label(content, width=5, text=show_speed85.get())
showspeed85.grid(column=34, row=126, columnspan=1)
showspeed86 = ttk.Label(content, width=5, text=show_speed86.get())
showspeed86.grid(column=34, row=132, columnspan=1)
showspeed87 = ttk.Label(content, width=5, text=show_speed87.get())
showspeed87.grid(column=34, row=138, columnspan=1)
showspeed88 = ttk.Label(content, width=5, text=show_speed88.get())
showspeed88.grid(column=34, row=144, columnspan=1)
showspeed89 = ttk.Label(content, width=5, text=show_speed89.get())
showspeed89.grid(column=34, row=150, columnspan=1)
showspeed90 = ttk.Label(content, width=5, text=show_speed90.get())
showspeed90.grid(column=34, row=156, columnspan=1)
showspeed91 = ttk.Label(content, width=5, text=show_speed91.get())
showspeed91.grid(column=34, row=162, columnspan=1)
showspeed92 = ttk.Label(content, width=5, text=show_speed92.get())
showspeed92.grid(column=34, row=168, columnspan=1)
showspeed93 = ttk.Label(content, width=5, text=show_speed93.get())
showspeed93.grid(column=34, row=174, columnspan=1)
showspeed94 = ttk.Label(content, width=5, text=show_speed94.get())
showspeed94.grid(column=34, row=180, columnspan=1)
showspeed95 = ttk.Label(content, width=5, text=show_speed95.get())
showspeed95.grid(column=34, row=186, columnspan=1)


showrepeat = ttk.Label(content, text=show_repeat.get())
showrepeat.grid(column=38, row=35, columnspan=1)

showloop = ttk.Label(content, text=show_loop.get())
showloop.grid(column=38, row=17, columnspan=1)

# Defining labels
repeatdelay = ttk.Label(content, text="LOOP DELAY    ", foreground="steel blue")
repeatdelay.grid(column=38, row=29, columnspan=2)
loopcontrol = ttk.Label(content, text="LOOPS    ", foreground="steel blue")
loopcontrol.grid(column=38, row=11, columnspan=2)
looptitle = ttk.Label(content, text="______LOOP CONTROL______     ", foreground="purple3")
looptitle.grid(column=38, row=0, columnspan=2)
track = ttk.Label(content, text="TEMPO TRACKING    ", foreground="steel blue")
track.grid(column=38, row=47, columnspan=2)

# Author
nameCopy1 = ttk.Label(content, text="walkerworks 2016", foreground="steel blue")
nameCopy1.grid(column=38, row=200, columnspan=4)

# Resize grip
ttk.Sizegrip().grid(column=1, row=1, sticky=(N,S))

canvas.create_window(0, 0, anchor=NW, window=content)
content.update_idletasks()
canvas.config(scrollregion=canvas.bbox("all"))

menubar=Menu(root)
filemenu=Menu(menubar,tearoff=0)
filemenu.add_command(label="Open", command=file_open)
filemenu.add_command(label="Save As...", command=file_save)
filemenu.add_separator()
filemenu.add_command(label="Exit", command=close_window)
menubar.add_cascade(label="File", menu=filemenu)

filemenu=Menu(menubar,tearoff=0)
filemenu.add_command(label="Start", command=start)
filemenu.add_command(label="Stop", command=stop)
filemenu.add_command(label="Reset", command=reset)
filemenu.add_separator()
filemenu.add_command(label="More loops", command=loopup)
filemenu.add_command(label="Less loops", command=loopdn)
filemenu.add_separator()
filemenu.add_command(label="Shorter loop delay", command=repeatup)
filemenu.add_command(label="Longer loop delay", command=repeatdn)
filemenu.add_separator()
filemenu.add_command(label="Tempo faster", command=trackup)
filemenu.add_command(label="Tempo slower", command=trackdn)
menubar.add_cascade(label="Control", menu=filemenu)

helpmenu=Menu(menubar,tearoff=0)
helpmenu.add_command(label="Help",command=help_0)
helpmenu.add_separator()
helpmenu.add_command(label="About",command=about)
menubar.add_cascade(label="Help",menu=helpmenu)
root.config(menu=menubar)


GPIO.add_event_detect(24, GPIO.RISING, bouncetime=100, callback=synthstart)
GPIO.add_event_detect(10, GPIO.RISING, bouncetime=100, callback=synthstop)
GPIO.add_event_detect(9, GPIO.RISING, bouncetime=100, callback=exttrackup)
GPIO.add_event_detect(11, GPIO.RISING, bouncetime=100, callback=exttrackdn)


init(root)
root.mainloop()